From: Mikael Nordfeldth Date: Fri, 26 Feb 2016 00:11:20 +0000 (+0100) Subject: Make sure the saved Notice has an ID X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c58228195b6e187c5370d3929c623db89ac9ee23;p=quix0rs-gnu-social.git Make sure the saved Notice has an ID --- diff --git a/classes/Notice.php b/classes/Notice.php index 86eec8e3ad..892f2be30e 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -997,7 +997,9 @@ class Notice extends Managed_DataObject } } if (!$stored instanceof Notice) { - throw new ServerException('StartNoticeSave did not give back a Notice'); + throw new ServerException('StartNoticeSave did not give back a Notice.'); + } elseif (empty($stored->id)) { + throw new ServerException('Supposedly saved Notice has no ID.'); } // Only save 'attention' and metadata stuff (URLs, tags...) stuff if