Mglaser has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320085

Change subject: ApiWikiPageTasks: fixed notice
......................................................................

ApiWikiPageTasks: fixed notice

When page_id or page_title is not set, the code used to produce
a php notice. Checking for availability of these variable now.

Change-Id: Id5030af14784cc8ab40d05fb0fbee414e5ad704b
---
M includes/api/BSApiWikiPageTasks.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/85/320085/1

diff --git a/includes/api/BSApiWikiPageTasks.php 
b/includes/api/BSApiWikiPageTasks.php
index d38396a..6850e46 100644
--- a/includes/api/BSApiWikiPageTasks.php
+++ b/includes/api/BSApiWikiPageTasks.php
@@ -376,8 +376,11 @@
         * @todo: Maybe have this logic in "parent::getTitle" altogether
         */
        protected function getTitleFromTaskData( $oTaskData ) {
-               $oTitle = Title::newFromID( $oTaskData->page_id );
-               if ( $oTitle instanceof Title === false ) {
+               $oTitle = null;
+               if ( isset( $oTaskData->page_id ) ) {
+                       $oTitle = Title::newFromID( $oTaskData->page_id );
+               }
+               if ( $oTitle instanceof Title === false && isset( 
$oTaskData->page_title ) ) {
                        $oTitle = Title::newFromText( $oTaskData->page_title );
                }
                if ( $oTitle instanceof Title === false ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/320085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5030af14784cc8ab40d05fb0fbee414e5ad704b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to