diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-24 20:18:36 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-24 20:18:36 -0700 |
commit | 06a674775e5606a98e0e7357b0c88378ca679e6d (patch) | |
tree | 9f6feb413ee74f0cf98d43db172bc960cff812ee /Zotlabs/Lib | |
parent | b1954070283ecd9aacb59ed26e684112f9903f49 (diff) | |
download | volse-hubzilla-06a674775e5606a98e0e7357b0c88378ca679e6d.tar.gz volse-hubzilla-06a674775e5606a98e0e7357b0c88378ca679e6d.tar.bz2 volse-hubzilla-06a674775e5606a98e0e7357b0c88378ca679e6d.zip |
handle jsonld parse errors and send them to the app log instead of the php log.
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/LDSignatures.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Zotlabs/Lib/LDSignatures.php b/Zotlabs/Lib/LDSignatures.php index d500799c0..6d7127cde 100644 --- a/Zotlabs/Lib/LDSignatures.php +++ b/Zotlabs/Lib/LDSignatures.php @@ -88,8 +88,16 @@ class LDSignatures { return ''; jsonld_set_document_loader('jsonld_document_loader'); + + try { + $d = jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]); + } + catch (\Exception $e) { + logger('normalise error:' . print_r($e,true)); + logger('normalise error: ' . print_r($data,true)); + } - return jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]); + return $d; } static function salmon_sign($data,$channel) { |