mirror of
https://github.com/friendica/friendica
synced 2024-12-23 18:00:17 +00:00
Merge pull request #6775 from annando/issue-6395
Issue 6395: Don't log details to avoid memory issues
This commit is contained in:
commit
53952bb426
1 changed files with 7 additions and 3 deletions
|
@ -35,7 +35,7 @@ class JsonLD
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($recursion > 5) {
|
if ($recursion > 5) {
|
||||||
Logger::log('jsonld bomb detected at: ' . $url);
|
Logger::error('jsonld bomb detected at: ' . $url);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,9 @@ class JsonLD
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$normalized = false;
|
$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;
|
return $normalized;
|
||||||
|
@ -115,7 +117,9 @@ class JsonLD
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$compacted = false;
|
$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);
|
$json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
|
||||||
|
|
Loading…
Reference in a new issue