MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/134853

Change subject: Fix 'JSON_PRETTY_PRINT is not defined' warning
......................................................................

Fix 'JSON_PRETTY_PRINT is not defined' warning

This is really weird - PHP 5.3.10 appears to have JSON_UNESCAPED_UNICODE
but not JSON_PRETTY_PRINT which causes warnings in production also reproduceable
in Vagrant.

Change-Id: I0fd8a666c28aa58947c037c23506d3ce41d427ff
---
M includes/json/FormatJson.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/134853/1

diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php
index e45dd3a..8493456 100644
--- a/includes/json/FormatJson.php
+++ b/includes/json/FormatJson.php
@@ -106,7 +106,7 @@
                        $pretty = $pretty ? '    ' : false;
                }
 
-               if ( defined( 'JSON_UNESCAPED_UNICODE' ) ) {
+               if ( defined( 'JSON_UNESCAPED_UNICODE' ) && defined( 
'JSON_PRETTY_PRINT' ) ) {
                        return self::encode54( $value, $pretty, $escaping );
                }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fd8a666c28aa58947c037c23506d3ce41d427ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to