jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389996 )

Change subject: Fix for fatal when link is broken
......................................................................


Fix for fatal when link is broken

Eventhough i couldnt reproduce it since, i found a fatal in error_log,
saying File object was null

Add hook for allowing other extensions to add their items

Change-Id: I31b2712846d7d42fc36a8f6af4fcdf79f1a9b997
---
M ContextMenu/includes/api/BSApiContextMenuTasks.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/ContextMenu/includes/api/BSApiContextMenuTasks.php 
b/ContextMenu/includes/api/BSApiContextMenuTasks.php
index c028a73..7c5cd86 100644
--- a/ContextMenu/includes/api/BSApiContextMenuTasks.php
+++ b/ContextMenu/includes/api/BSApiContextMenuTasks.php
@@ -46,10 +46,12 @@
 
                if( $oTitle->getNamespace() === NS_FILE && $oTitle->exists() ) {
                        $oFile = wfFindFile( $oTitle );
-                       $this->makeFileItems( $aItems, $oTitle, $oFile );
-                       return $this->returnItems( $oResult, $aItems );
+                       if( $oFile->exists() ) {
+                               $this->makeFileItems( $aItems, $oTitle, $oFile 
);
+                       }
                }
 
+               Hooks::run( 'BsContextMenuGetItems', array( &$aItems, $oTitle ) 
);
                return $this->returnItems( $oResult, $aItems );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31b2712846d7d42fc36a8f6af4fcdf79f1a9b997
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27_dev
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[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