jenkins-bot has submitted this change and it was merged. Change subject: Use defined() instead of constant() ......................................................................
Use defined() instead of constant() To check for the existance of ApiBase::PARAM_HELP_MSG while preventing warnings from being issued: http://php.net/manual/en/function.constant.php#refsect1-function.constant-errors https://www.mediawiki.org/wiki/Thread:Extension_talk:PageImages/Can%27t_find_constant_API_base Same as Iceaf4e424cd929df7b3df46544844a4b0001f4d7. Change-Id: I2c83ed1c508ac837536dd0d21d4938296ad6ba03 --- M ApiQueryPageImages.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiQueryPageImages.php b/ApiQueryPageImages.php index d939f77..93cb4dd 100644 --- a/ApiQueryPageImages.php +++ b/ApiQueryPageImages.php @@ -149,7 +149,7 @@ 'continue' => array( ApiBase::PARAM_TYPE => 'integer', /** @todo Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly */ - constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' => 'api-help-param-continue', + defined( 'ApiBase::PARAM_HELP_MSG' ) ? ApiBase::PARAM_HELP_MSG : '' => 'api-help-param-continue', ), ); } -- To view, visit https://gerrit.wikimedia.org/r/181778 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c83ed1c508ac837536dd0d21d4938296ad6ba03 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Ricordisamoa <[email protected]> Gerrit-Reviewer: MaxSem <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
