Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/202332
Change subject: Fix ApiQuerySiteInfo with siprop=rightsinfo to not warn if your wgRightsPage is null ...................................................................... Fix ApiQuerySiteInfo with siprop=rightsinfo to not warn if your wgRightsPage is null See also I2b36b7a3 Change-Id: I7d76cd48021a0097ce5e11f4ad4100cb85ee5ad0 (cherry picked from commit 89f2f724705cf8030fdc486fc6753a049ffa76df) --- M includes/api/ApiQuerySiteinfo.php 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/202332/1 diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 5ac1036..d4f7e6a 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -674,8 +674,14 @@ protected function appendRightsInfo( $property ) { $config = $this->getConfig(); - $title = Title::newFromText( $config->get( 'RightsPage' ) ); - $url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ) : $config->get( 'RightsUrl' ); + $rightsPage = $config->get( 'RightsPage' ); + if ( is_string( $rightsPage ) ) { + $title = Title::newFromText( $rightsPage ); + $url = wfExpandUrl( $title, PROTO_CURRENT ); + } else { + $title = false; + $url = $config->get( 'RightsUrl' ); + } $text = $config->get( 'RightsText' ); if ( !$text && $title ) { $text = $title->getPrefixedText(); -- To view, visit https://gerrit.wikimedia.org/r/202332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d76cd48021a0097ce5e11f4ad4100cb85ee5ad0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf23 Gerrit-Owner: Alex Monk <kren...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits