From 13d59e0c76b887a2bfd2e5cfcc2e0fedf728bc07 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 23 Mar 2010 17:24:01 -0700 Subject: fixup_deletions.php script to look for notices posted by now-deleted profiles and remove them. --- classes/Notice.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes/Notice.php') diff --git a/classes/Notice.php b/classes/Notice.php index f7194e339..be3e9ca2a 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -421,7 +421,9 @@ class Notice extends Memcached_DataObject } $profile = Profile::staticGet($this->profile_id); - $profile->blowNoticeCount(); + if (!empty($profile)) { + $profile->blowNoticeCount(); + } } /** -- cgit v1.2.3-54-g00ecf