X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FJsonLD.php;h=866fc2cdf54d532142039db2214ba55b3d8187f0;hb=720a43461d67ab229de0aecfc5008f22cc4c1c54;hp=fa169c00468c7c3c0d55b5e3b1b365159b65f5a5;hpb=ce6b4c27ea162f40798943a0d1b765e0dfb0c89e;p=friendica.git diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index fa169c0046..866fc2cdf5 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -1,6 +1,6 @@ $e->getLine(), 'message' => $e->getMessage()]); + Logger::notice('compacting error', ['line' => $e->getLine(), 'exception' => $e]); } $json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true); @@ -193,7 +193,7 @@ class JsonLD } // If it isn't an array yet, make it to one - if (!is_int(key($array[$element]))) { + if (!is_array($array[$element]) || !is_int(key($array[$element]))) { $array[$element] = [$array[$element]]; }