From 5144c0cb78c4575f68ad18c160837e232bc7b5a5 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 1 Mar 2014 17:19:10 +0100 Subject: [PATCH] Throw exception, don't return null in Conversation::create --- classes/Conversation.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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();