From: Mikael Nordfeldth Date: Sat, 16 Jan 2016 20:13:26 +0000 (+0100) Subject: Add a check in Notice->asActivityObject that we're actually returning such a thing! X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a85a08ff35987c6deddb61735ab3c4de74f2f67f;p=quix0rs-gnu-social.git Add a check in Notice->asActivityObject that we're actually returning such a thing! --- diff --git a/classes/Notice.php b/classes/Notice.php index 020df0c458..963b24ba5e 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -2128,6 +2128,11 @@ class Notice extends Managed_DataObject Event::handle('EndActivityObjectFromNotice', array($this, &$object)); } + if (!$object instanceof ActivityObject) { + common_log(LOG_ERR, 'Notice asActivityObject created something else for uri=='._ve($this->getUri()).': '._ve($object)); + throw new ServerException('Notice asActivityObject created something else.'); + } + return $object; }