Update database.php
This commit is contained in:
parent
0f744857d4
commit
653518d50d
|
@ -482,12 +482,12 @@ if(check_valid_function("json_decode_to_assoc")) {
|
||||||
function json_decode_to_assoc($data) {
|
function json_decode_to_assoc($data) {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
$fn = array(
|
$invalid_fn = array(
|
||||||
"NO_FUNCTION_JSON_DECODE" => "json_decode",
|
"NO_FUNCTION_JSON_DECODE" => "json_decode",
|
||||||
"NO_FUNCTION_JSON_LAST_ERROR" => "json_last_error",
|
"NO_FUNCTION_JSON_LAST_ERROR" => "json_last_error",
|
||||||
);
|
);
|
||||||
|
|
||||||
$error = check_invaild_function($fn);
|
$error = check_invaild_function($invalid_fn);
|
||||||
if($error == -1) {
|
if($error == -1) {
|
||||||
$obj = @json_decode($data, true);
|
$obj = @json_decode($data, true);
|
||||||
$result = (@json_last_error() === 0) ? $obj : $result;
|
$result = (@json_last_error() === 0) ? $obj : $result;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user