diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-07-07 02:26:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-07-07 02:26:18 -0400 |
commit | af2fdd0c7ba78cb53c9d1919944faba3bdeaac53 (patch) | |
tree | 3dc5a3ec1d911eb659ef0a43b83fe5863be2d322 /lib | |
parent | 8c9d88e26fa1af43d058d062721b240bc9d532ee (diff) |
check to see the reply_for worked
darcs-hash:20080707062618-84dde-2bf8d7476a7b234d0f3bc88ce0a20024654c6625.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index 6c5f4cd7a..7b59a7452 100644 --- a/lib/util.php +++ b/lib/util.php @@ -845,8 +845,10 @@ function common_save_replies($notice) { $reply->notice_id = $notice->id; $reply->profile_id = $recipient->id; $reply->created = DB_DataObject_Cast::dateTime(); - $recipient_notice = $reply_for->getCurrentNotice($notice->created); - $reply->replied_id = $recipient_notice->id; + if ($reply_for) { + $recipient_notice = $reply_for->getCurrentNotice($notice->created); + $reply->replied_id = $recipient_notice->id; + } $id = $reply->insert(); if (!$id) { common_log_db_error($reply, 'INSERT', __FILE__); |