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:
authorrobocoder <anthon.pang@gmail.com>2011-12-03 08:51:33 +0400
committerrobocoder <anthon.pang@gmail.com>2011-12-03 08:51:33 +0400
commit4cef0f9bac72994688acf0813140f4c7a21f6f4c (patch)
treeb25732e314f087ce600cfd5ba8034a0ac4fe6f27 /libs/upgradephp
parent56150c70bc63fe68d535ad45cad55872899aa3e4 (diff)
refs #2735, refs #2812
git-svn-id: http://dev.piwik.org/svn/trunk@5520 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/upgradephp')
-rw-r--r--libs/upgradephp/upgrade.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php
index 57204a5547..be9f0b2c45 100644
--- a/libs/upgradephp/upgrade.php
+++ b/libs/upgradephp/upgrade.php
@@ -132,7 +132,7 @@ function _json_encode($var, /*emu_args*/$obj=FALSE) {
foreach ((array)$var as $i=>$v) {
$json .= ($json !== '' ? "," : "") // comma separators
. ($obj ? ("\"$i\":") : "") // assoc prefix
- . (json_encode($v)); // value
+ . (_json_encode($v)); // value
}
#-- enclose into braces or brackets
@@ -265,15 +265,15 @@ function _json_decode($json, $assoc=FALSE, /*emu_args*/$n=0,$state=0,$waitfor=0)
#-= in-array
elseif ($state===']') {
- list($v, $n) = json_decode($json, 0, $n, 0, ",]");
+ list($v, $n) = _json_decode($json, 0, $n, 0, ",]");
$val[] = $v;
if ($json[$n] == "]") { return array($val, $n); }
}
#-= in-object
elseif ($state==='}') {
- list($i, $n) = json_decode($json, 0, $n, 0, ":"); // this allowed non-string indicies
- list($v, $n) = json_decode($json, $assoc, $n+1, 0, ",}");
+ list($i, $n) = _json_decode($json, 0, $n, 0, ":"); // this allowed non-string indicies
+ list($v, $n) = _json_decode($json, $assoc, $n+1, 0, ",}");
$val[$i] = $v;
if ($json[$n] == "}") { return array($val, $n); }
}
@@ -293,7 +293,7 @@ function _json_decode($json, $assoc=FALSE, /*emu_args*/$n=0,$state=0,$waitfor=0)
#-> object
elseif ($c == "{") {
- list($val, $n) = json_decode($json, $assoc, $n+1, '}', "}");
+ list($val, $n) = _json_decode($json, $assoc, $n+1, '}', "}");
if ($val && $n && !$assoc) {
$obj = new stdClass();
foreach ($val as $i=>$v) {
@@ -305,7 +305,7 @@ function _json_decode($json, $assoc=FALSE, /*emu_args*/$n=0,$state=0,$waitfor=0)
}
#-> array
elseif ($c == "[") {
- list($val, $n) = json_decode($json, $assoc, $n+1, ']', "]");
+ list($val, $n) = _json_decode($json, $assoc, $n+1, ']', "]");
}
#-> comment