From 937079709514c037959d691c0d653c39d5ea84e6 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 May 2016 20:26:23 -0400 Subject: Minor fixes --- app/Model/CommentModel.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/Model/CommentModel.php') diff --git a/app/Model/CommentModel.php b/app/Model/CommentModel.php index 6e5fd9d8..36e1fc48 100644 --- a/app/Model/CommentModel.php +++ b/app/Model/CommentModel.php @@ -3,7 +3,6 @@ namespace Kanboard\Model; use Kanboard\Event\CommentEvent; - use Kanboard\Core\Base; /** @@ -114,7 +113,7 @@ class CommentModel extends Base $values['date_creation'] = time(); $comment_id = $this->db->table(self::TABLE)->persist($values); - if ($comment_id) { + if ($comment_id !== false) { $event = new CommentEvent(array('id' => $comment_id) + $values); $this->dispatcher->dispatch(self::EVENT_CREATE, $event); $this->userMentionModel->fireEvents($values['comment'], self::EVENT_USER_MENTION, $event); -- cgit v1.2.3