From b23d46c8eb74f563b33c1edf80db80fc29c89e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Thu, 5 Oct 2023 17:51:02 +0200 Subject: [PATCH] Update Dao.php --- src/ProcessManagerBundle/Model/Executable/Dao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProcessManagerBundle/Model/Executable/Dao.php b/src/ProcessManagerBundle/Model/Executable/Dao.php index d1a5b97..1340fb4 100644 --- a/src/ProcessManagerBundle/Model/Executable/Dao.php +++ b/src/ProcessManagerBundle/Model/Executable/Dao.php @@ -36,7 +36,7 @@ public function getById($id = null) $data = $this->db->fetchAssociative('SELECT * FROM '.$this->tableName.' WHERE id = ?', [$this->model->getId()]); - if (!$data["id"]) { + if ($data === false) { throw new \Exception("Executable with the ID " . $this->model->getId() . " doesn't exists"); }