Pwirth has submitted this change and it was merged. 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(-) Approvals: Pwirth: Verified; Looks good to me, approved 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: merged Gerrit-Change-Id: I16bc1921d79cc92d0e1d4716d156fa5a8658b909 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: REL1_22 Gerrit-Owner: Tweichart <weich...@hallowelt.biz> Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz> Gerrit-Reviewer: Pwirth <wi...@hallowelt.biz> Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits