Robert Vogel has uploaded a new change for review. (
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(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/96/389996/1
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: newchange
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]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits