diff --git a/classes/Notice.php b/classes/Notice.php index 0f2006e143..de45bdaae1 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -2305,7 +2305,11 @@ class Notice extends Memcached_DataObject */ function inScope($profile) { - $keypart = sprintf('notice:in-scope-for:%d:%d', $this->id, $profile->id); + if (is_null($profile)) { + $keypart = sprintf('notice:in-scope-for:%d:null', $this->id); + } else { + $keypart = sprintf('notice:in-scope-for:%d:%d', $this->id, $profile->id); + } $result = self::cacheGet($keypart);