From 6d33c003fc8d8b09097549307305eb6e73f1d627 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 4 Apr 2016 12:04:20 +0200 Subject: [PATCH] Maybe stop deleteRelated from failing on constraint checking --- classes/Notice.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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;