]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Maybe stop deleteRelated from failing on constraint checking
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 4 Apr 2016 10:04:20 +0000 (12:04 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 4 Apr 2016 10:04:20 +0000 (12:04 +0200)
classes/Notice.php

index 1b09c01a7905ab5459d3bb37d62f95091d83e882..6501a83adb85d675b79e1f303ab1da00152234c0 100644 (file)
@@ -1537,12 +1537,16 @@ class Notice extends Managed_DataObject
 
     function getProfileTags()
     {
-        $profile = $this->getProfile();
-        $list    = $profile->getOtherTags($profile);
         $ptags   = array();
+        try {
+            $profile = $this->getProfile();
+            $list    = $profile->getOtherTags($profile);
 
-        while($list->fetch()) {
-            $ptags[] = clone($list);
+            while($list->fetch()) {
+                $ptags[] = clone($list);
+            }
+        } catch (Exception $e) {
+            common_log(LOG_ERR, "Error during Notice->getProfileTags() for id=={$this->getID()}: {$e->getMessage()}");
         }
 
         return $ptags;