jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Id5030af14784cc8ab40d05fb0fbee414e5ad704b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: Dvogel hallowelt <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to