mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Merge pull request #6697 from annando/memory-jsonld
Avoid memory issue in exception of JSON-LD parser
This commit is contained in:
commit
1df19d3553
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ class JsonLD
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$normalized = false;
|
$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;
|
return $normalized;
|
||||||
|
@ -115,7 +115,7 @@ class JsonLD
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$compacted = false;
|
$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);
|
$json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
|
||||||
|
|
Loading…
Reference in a new issue