jenkins-bot has submitted this change and it was merged.
Change subject: Don't pass empty message text to strpos
......................................................................
Don't pass empty message text to strpos
Bug: T97050
Change-Id: I2cb6ddb306ca1b0029fc452b7caf0587246b4fb5
---
M includes/skins/SkinMinerva.php
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Bmansurov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 91615c7..d54746a 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -1180,7 +1180,13 @@
// for plural support we need the info, if there is one or more
licenses used in the license text
// this check if very simple and works on the base, that more
than one license will
// use "and" as a connective
- $isPlural = ( strpos( $rightsText, wfMessage( 'and' )->text() )
=== false ? 1 : 2 );
+ // 1 - no plural
+ // 2 - plural
+ $delimiterMsg = wfMessage( 'and' );
+ // check, if "and" isn't disabled and exists in site language
+ $isPlural = (
+ !$delimiterMsg->isDisabled() && strpos( $rightsText,
$delimiterMsg->text() ) === false ? 1 : 2
+ );
return array(
'link' => $link,
--
To view, visit https://gerrit.wikimedia.org/r/206148
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2cb6ddb306ca1b0029fc452b7caf0587246b4fb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Kaldari <[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