summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/CommentModel.php3
-rw-r--r--app/Model/SubtaskModel.php2
2 files changed, 2 insertions, 3 deletions
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);
diff --git a/app/Model/SubtaskModel.php b/app/Model/SubtaskModel.php
index b63cf0a1..019064ad 100644
--- a/app/Model/SubtaskModel.php
+++ b/app/Model/SubtaskModel.php
@@ -218,7 +218,7 @@ class SubtaskModel extends Base
$this->prepareCreation($values);
$subtask_id = $this->db->table(self::TABLE)->persist($values);
- if ($subtask_id) {
+ if ($subtask_id !== false) {
$this->container['dispatcher']->dispatch(
self::EVENT_CREATE,
new SubtaskEvent(array('id' => $subtask_id) + $values)