Pwirth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365983 )

Change subject: Emoticons: Fixed "colored 0 error"
......................................................................

Emoticons: Fixed "colored 0 error"

Any colored 0 (<span style="color:red;">0</span>) would be removed from
the content. The reason is an misused empty function. PHP empty is true
on 0, so the content was replaced with an empty string. Now checking for
str_len instead.

ERM#6926

Change-Id: Iccb6f7ed107a3a52f35abe05ba2803f5fbd7c554
---
M Emoticons/Emoticons.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/83/365983/1

diff --git a/Emoticons/Emoticons.class.php b/Emoticons/Emoticons.class.php
index d56880d..701b14c 100644
--- a/Emoticons/Emoticons.class.php
+++ b/Emoticons/Emoticons.class.php
@@ -130,7 +130,7 @@
                }
 
                $fCallable = function( $aMatches ) use( $aMapping ) {
-                       return empty( $aMatches[0] ) ? '' : str_replace(
+                       return strlen( $aMatches[0] ) === 0 ? '' : str_replace(
                                $aMapping['emoticons'],
                                $aMapping['replacements'],
                                $aMatches[0]

-- 
To view, visit https://gerrit.wikimedia.org/r/365983
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccb6f7ed107a3a52f35abe05ba2803f5fbd7c554
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to