Elasticsearch: only throw error on actual decoding error

This commit is contained in:
Gargaj 2014-09-06 01:08:13 +02:00 committed by Jakub Vrana
parent b08631dab3
commit 7066325e41

View file

@ -31,7 +31,7 @@ if (isset($_GET["elastic"])) {
return false;
}
$return = json_decode($file, true);
if (!$return) {
if ($return === null) {
$this->errno = json_last_error();
if (function_exists('json_last_error_msg')) {
$this->error = json_last_error_msg();