From: Roland Haeder Date: Fri, 27 Mar 2015 22:49:18 +0000 (+0100) Subject: fetch() must work to get this check passed. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f60fa5c954d18841d33e41850d4e84c747fe38f1;p=quix0rs-gnu-social.git fetch() must work to get this check passed. Signed-off-by: Roland Haeder --- diff --git a/classes/Notice_tag.php b/classes/Notice_tag.php index eb36b83410..ccf00cbb5d 100644 --- a/classes/Notice_tag.php +++ b/classes/Notice_tag.php @@ -94,8 +94,16 @@ class Notice_tag extends Managed_DataObject // 1) Get notice object and set id $notice = new Notice(); - $notice->id = $this->notice_id; - $notice->scope = $this->scope; + $notice->id = $this->notice_id; + + /* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . '] this->tag=' . $this->tag . ',this->notice_id=' . $this->notice_id . ' - Calling fetch() ...'); + + // Fetch notice + if (!$notice->fetch()) { + // No longer valid, so better don't allow to see it + return FALSE; + } + /* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . '] this->tag=' . $this->tag . ',notice->id=' . $notice->id . ',notice->scope=' . $notice->scope); // Is it private scope?