瀏覽代碼

Fix DB\AbstractStatement

#9
Visman 3 年之前
父節點
當前提交
b12b96ccd5
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/Core/DB/AbstractStatement.php

+ 4 - 1
app/Core/DB/AbstractStatement.php

@@ -45,7 +45,10 @@ abstract class AbstractStatement extends DBStatement
         $types = $this->getColumnsType();
 
         foreach ($data as $key => &$value) {
-            if (isset($types[$key])) {
+            if (
+                isset($types[$key])
+                && \is_scalar($value)
+            ) {
                 switch ($types[$key]) {
                     case self::INTEGER:
                         $value += 0; // If the string is not a number, then Warning/Notice