DIGITEC-1105 | Add is_array check for map bind

This commit is contained in:
2019-03-06 20:37:26 +03:00
parent da17b79291
commit 3126483bae

View File

@ -21,7 +21,7 @@ class MySQLiStatement extends DbStatement
if ($this->map === null) { if ($this->map === null) {
$this->mapPlaceholders(); $this->mapPlaceholders();
} }
if (count($this->map) > 0) { if (is_array($this->map) && count($this->map) > 0) {
if (!is_string($param) && !is_int($param)) { if (!is_string($param) && !is_int($param)) {
throw new \Majestic\Exception\GeneralException('Placeholder must be an integer or string'); throw new \Majestic\Exception\GeneralException('Placeholder must be an integer or string');
} }