]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/scripts/update-profile.php
More Exceptions for FeedSub doSubscribe and related functions
[quix0rs-gnu-social.git] / plugins / OStatus / scripts / update-profile.php
index a0d007a8af1191f7bf72c1f973a276ced639b59b..ece19804420a1841d6a598ff98d1274137dae9ca 100644 (file)
@@ -105,14 +105,13 @@ if ($huburi != $sub->huburi) {
     print "Feed record ok, not changing.\n\n";
 }
 
-print "\n";
-print "Pinging hub $sub->huburi with new subscription for $sub->uri\n";
-$ok = $sub->subscribe();
-
-if ($ok) {
-    print "ok\n";
-} else {
-    print "Could not confirm.\n";
+echo "\n";
+echo "Pinging hub {$sub->huburi} with new subscription for {$sub->uri}\n";
+try {
+    $sub->subscribe();
+    echo "ok\n";
+} catch (Exception $e) {
+    echo 'Could not confirm. '.get_class($e).': '.$e->getMessage()."\n";
 }
 
 $o2 = Ostatus_profile::getKV('uri', $uri);