From 0b2cdf5d264ed15274a81976e30802ba04045bab Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 Feb 2019 09:07:24 +0000 Subject: [PATCH] Issue 6395: Don't log details to avoid memory issues --- src/Util/JsonLD.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index ec68375d65..9b0012fe38 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -35,7 +35,7 @@ class JsonLD } if ($recursion > 5) { - Logger::log('jsonld bomb detected at: ' . $url); + Logger::error('jsonld bomb detected at: ' . $url); exit(); } @@ -68,7 +68,9 @@ class JsonLD } catch (Exception $e) { $normalized = false; - Logger::log('normalise error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); + Logger::error('normalise error'); + // Sooner or later we should log some details as well - but currently this leads to memory issues + // Logger::log('normalise error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); } return $normalized; @@ -115,7 +117,9 @@ class JsonLD } catch (Exception $e) { $compacted = false; - Logger::log('compacting error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); + Logger::error('compacting error'); + // Sooner or later we should log some details as well - but currently this leads to memory issues + // 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