jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/369470 )
Change subject: Fix call to Title::getTalkPage
......................................................................
Fix call to Title::getTalkPage
It's going to be deprecated
Bug: T172146
Change-Id: I7ba95201ce0158bfb6aee0a769e381b1e1333eef
---
M api/CheckConstraints.php
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Lucas Werkmeister (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/CheckConstraints.php b/api/CheckConstraints.php
index 49f7f57..0155a21 100644
--- a/api/CheckConstraints.php
+++ b/api/CheckConstraints.php
@@ -351,7 +351,10 @@
} catch ( StatementGuidParsingException $e ) {
// constraint template on talk page
$typeLabel = htmlspecialchars( $typeItemId );
- $link = $title->getTalkPage()->getFullUrl();
+ if ( !$title->canHaveTalkPage() ) {
+ throw new MWException( 'Properties
namespace must define a talk namespace' );
+ }
+ $link =
$title->getTalkPageIfDefined()->getFullUrl();
}
$result = [
--
To view, visit https://gerrit.wikimedia.org/r/369470
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ba95201ce0158bfb6aee0a769e381b1e1333eef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits