aboutsummaryrefslogtreecommitdiff
path: root/classes/Conversation.php
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2014-03-01 17:19:10 +0100
committerMikael Nordfeldth <mmn@hethane.se>2014-03-01 17:19:10 +0100
commit5144c0cb78c4575f68ad18c160837e232bc7b5a5 (patch)
tree46cd3ac5de99bf2c9eb27868a4f28aedf2074358 /classes/Conversation.php
parent5c505d8539c03cb1355b00756b826bfb265033d7 (diff)
downloadgnu-social-5144c0cb78c4575f68ad18c160837e232bc7b5a5.tar
gnu-social-5144c0cb78c4575f68ad18c160837e232bc7b5a5.zip
Throw exception, don't return null in Conversation::create
Diffstat (limited to 'classes/Conversation.php')
-rwxr-xr-xclasses/Conversation.php3
1 files changed, 1 insertions, 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();