Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/206358
Change subject: fix for required options on api call ...................................................................... fix for required options on api call Change-Id: I16bc1921d79cc92d0e1d4716d156fa5a8658b909 --- M includes/CoreHooks.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/58/206358/1 diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php index 01df79f..f82db79 100644 --- a/includes/CoreHooks.php +++ b/includes/CoreHooks.php @@ -279,7 +279,8 @@ public static function onApiCheckCanExecute( $module, $user, &$message ){ if (!$module instanceof ApiParse) return true; - if (Title::newFromText($module->getRequest()->getVal('page'))->userCan('read') == false){ + $oTitle = Title::newFromText( $module->getRequest()->getVal( 'page' ) ); + if ( !is_null( $oTitle ) && $oTitle->userCan( 'read' ) == false ) { $message = wfMessage('loginreqpagetext', wfMessage('loginreqlink')->plain())->plain(); return false; } -- To view, visit https://gerrit.wikimedia.org/r/206358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16bc1921d79cc92d0e1d4716d156fa5a8658b909 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: REL1_22 Gerrit-Owner: Tweichart <weich...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits