]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/scripts/update_ostatus_profiles.php
Renamed commandline.inc -> commandline.inc.php to avoid confusion.
[quix0rs-gnu-social.git] / plugins / OStatus / scripts / update_ostatus_profiles.php
index c97125f08c0e91aa83d0ccb8fad5dfda3e0aaa63..b4191e9eb5a19e7925f02e7f4d416da90b41d02c 100644 (file)
@@ -35,7 +35,7 @@ you have no backup.
 
 UPDATE_OSTATUS_PROFILES;
 
-require_once INSTALLDIR . '/scripts/commandline.inc';
+require_once INSTALLDIR . '/scripts/commandline.inc.php';
 
 /*
  * Hacky class to remove some checks and get public access to
@@ -214,9 +214,12 @@ class LooseOstatusProfile extends Ostatus_profile
 
         $hints = array('webfinger' => $addr);
 
-        $dhints = DiscoveryHints::fromXRD($xrd);
-
-        $hints = array_merge($hints, $dhints);
+        try {
+            $dHints = DiscoveryHints::fromXRD($xrd);
+            $hints = array_merge($hints, $xrdHints);
+        } catch (Exception $e) {
+            // No hints available from XRD
+        }
 
         // If there's an Hcard, let's grab its info
         if (array_key_exists('hcard', $hints)) {