Elasticsearch: only throw error on actual decoding error
This commit is contained in:
parent
b08631dab3
commit
7066325e41
|
@ -31,7 +31,7 @@ if (isset($_GET["elastic"])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$return = json_decode($file, true);
|
$return = json_decode($file, true);
|
||||||
if (!$return) {
|
if ($return === null) {
|
||||||
$this->errno = json_last_error();
|
$this->errno = json_last_error();
|
||||||
if (function_exists('json_last_error_msg')) {
|
if (function_exists('json_last_error_msg')) {
|
||||||
$this->error = json_last_error_msg();
|
$this->error = json_last_error_msg();
|
||||||
|
|
Loading…
Reference in a new issue