Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-07-04 18:35:39 +0400
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-07-04 18:35:39 +0400
commit244e0ab23d1c174358b08be7e5c1d2f0e98f328c (patch)
tree7521f4e6188c69ae1b2f73e7159944b160b2b747 /libs/upgradephp
parent6e8d0e5848809df40c56b5d88e022f546bdca9b9 (diff)
Fix JSON parse error when using upgradephp's emulated json_encode()
Diffstat (limited to 'libs/upgradephp')
-rw-r--r--libs/upgradephp/upgrade.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php
index 0e441e1c22..de0c762e32 100644
--- a/libs/upgradephp/upgrade.php
+++ b/libs/upgradephp/upgrade.php
@@ -140,7 +140,7 @@ if (!function_exists("json_encode")) {
if (!utf8_decode($var)) {
$var = utf8_encode($var);
}
- $var = str_replace(array("\"", "\\", "/", "\b", "\f", "\n", "\r", "\t"), array("\\\"", "\\\\", "\\/", "\\b", "\\f", "\\n", "\\r", "\\t"), $var);
+ $var = str_replace(array("\\", "\"", "/", "\b", "\f", "\n", "\r", "\t"), array("\\\\", "\\\"", "\\/", "\\b", "\\f", "\\n", "\\r", "\\t"), $var);
$json = '"' . $var . '"';
//@COMPAT: for fully-fully-compliance $var = preg_replace("/[\000-\037]/", "", $var);
}