From bb2d713ab3d8ac454fd3903e9b7142220019aa28 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 20 Apr 2018 13:24:30 +0300 Subject: [PATCH] count fix --- Model/MySQLiStatement.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Model/MySQLiStatement.php b/Model/MySQLiStatement.php index 87cdaf6..bb537e9 100644 --- a/Model/MySQLiStatement.php +++ b/Model/MySQLiStatement.php @@ -21,7 +21,8 @@ class MySQLiStatement extends DbStatement if ($this->map === null) { $this->mapPlaceholders(); } - if (count($this->map) > 0) { + + if ($this->map) { if (!is_string($param) && !is_int($param)) { throw new \Majestic\Exception\GeneralException('Placeholder must be an integer or string'); } @@ -33,6 +34,7 @@ class MySQLiStatement extends DbStatement return true; } } + return false; } protected function mapPlaceholders()