From: Mikael Nordfeldth Date: Mon, 4 Apr 2016 10:04:20 +0000 (+0200) Subject: Maybe stop deleteRelated from failing on constraint checking X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6d33c003fc8d8b09097549307305eb6e73f1d627;p=quix0rs-gnu-social.git Maybe stop deleteRelated from failing on constraint checking --- diff --git a/classes/Notice.php b/classes/Notice.php index 1b09c01a79..6501a83adb 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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;