Skip to content

Commit

Permalink
Fix a return value for better consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mehlah committed Dec 20, 2011
1 parent 95d7fb9 commit fc21f31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ public function comment($record, $params = array()) {
$comment = $comment::create($data);

if (empty($record->_id) || !$comment->save()) {
return null;
return false;
}

$data = $comment->data();
$comments = !empty($record->comments) ? $record->comments->data() : array();

Expand Down

0 comments on commit fc21f31

Please sign in to comment.