From: Mikael Nordfeldth Date: Sat, 1 Mar 2014 16:19:10 +0000 (+0100) Subject: Throw exception, don't return null in Conversation::create X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5144c0cb78c4575f68ad18c160837e232bc7b5a5;p=quix0rs-gnu-social.git Throw exception, don't return null in Conversation::create --- diff --git a/classes/Conversation.php b/classes/Conversation.php index 9be6113fb8..c76b0169ff 100755 --- a/classes/Conversation.php +++ b/classes/Conversation.php @@ -63,8 +63,7 @@ class Conversation extends Managed_DataObject static function create(Notice $notice) { if (empty($notice->id)) { - common_debug('Tried to create conversation for not yet inserted notice'); - return null; + throw new ServerException(_('Tried to create conversation for not yet inserted notice')); } $conv = new Conversation(); $conv->created = common_sql_now();