From: Michael Date: Tue, 19 Feb 2019 07:49:27 +0000 (+0000) Subject: Avoid memory issue in exception X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4facd1dfdba93ede48ca40b5e146424e6701118b;p=friendica.git Avoid memory issue in exception --- diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 8cc9f274d9..ec68375d65 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -68,7 +68,7 @@ class JsonLD } catch (Exception $e) { $normalized = false; - Logger::log('normalise error:' . print_r($e, true), Logger::DEBUG); + Logger::log('normalise error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); } return $normalized; @@ -115,7 +115,7 @@ class JsonLD } catch (Exception $e) { $compacted = false; - Logger::log('compacting error:' . print_r($e, true), Logger::DEBUG); + Logger::log('compacting error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); } $json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);