Maybe stop deleteRelated from failing on constraint checking

This commit is contained in:
Mikael Nordfeldth 2016-04-04 12:04:20 +02:00
parent b1de90fe08
commit 6d33c003fc
1 changed files with 8 additions and 4 deletions

View 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;