projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c7478
)
if json_encode fails - failback to php version
author
Alan Knowles
<alan@roojs.com>
Tue, 19 May 2020 07:35:04 +0000
(15:35 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 19 May 2020 07:35:04 +0000
(15:35 +0800)
Pman.php
patch
|
blob
|
history
diff --git
a/Pman.php
b/Pman.php
index
d387018
..
4a8acec
100644
(file)
--- a/
Pman.php
+++ b/
Pman.php
@@
-357,7
+357,10
@@
class Pman extends HTML_FlexyFramework_Page
header("Content-type: text/javascript");
}
if (function_exists("json_encode")) {
- return json_encode($v);
+ $ret= json_encode($v);
+ if ($ret !== false) {
+ return $ret;
+ }
}
require_once 'Services/JSON.php';
$js = new Services_JSON();
@@
-661,6
+664,7
@@
class Pman extends HTML_FlexyFramework_Page
}
file_put_contents($fn, $ret);
}
+
echo $ret;
exit;
}