From 4facd1dfdba93ede48ca40b5e146424e6701118b Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Feb 2019 07:49:27 +0000 Subject: [PATCH] Avoid memory issue in exception --- src/Util/JsonLD.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5