summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/salmon.php
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-02-25 09:39:16 -0500
committerJames Walker <walkah@walkah.net>2010-02-25 17:09:54 -0500
commite62e49ed3be08e30ab5ea6a5a46e1f90d4715182 (patch)
tree101ace347b2eeb2b2394750661edd105fb20eae5 /plugins/OStatus/lib/salmon.php
parentbac959ad46e6e04bce8c29f8a24e198e62bf5616 (diff)
adding some exception handling for magicenv parsing
Diffstat (limited to 'plugins/OStatus/lib/salmon.php')
-rw-r--r--plugins/OStatus/lib/salmon.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/OStatus/lib/salmon.php b/plugins/OStatus/lib/salmon.php
index b5f178cc6..9d4359f74 100644
--- a/plugins/OStatus/lib/salmon.php
+++ b/plugins/OStatus/lib/salmon.php
@@ -72,8 +72,12 @@ class Salmon
// TODO: Should probably be getting the signer uri as an argument?
$signer_uri = $magic_env->getAuthor($text);
- $env = $magic_env->signMessage($text, 'application/atom+xml', $signer_uri);
-
+ try {
+ $env = $magic_env->signMessage($text, 'application/atom+xml', $signer_uri);
+ } catch (Exception $e) {
+ common_log(LOG_ERR, "Salmon signing failed: ". $e->getMessage());
+ return $text;
+ }
return $magic_env->unfold($env);
}