Jelajahi Sumber

Fix DB\SqliteStatement for #9

For tables with no integer/boolean fields.
Visman 3 tahun lalu
induk
melakukan
3bd0a4aa3b
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      app/Core/DB/SqliteStatement.php

+ 7 - 1
app/Core/DB/SqliteStatement.php

@@ -46,7 +46,7 @@ class SqliteStatement extends AbstractStatement
 
     public function getColumnsType(): array
     {
-        if ($this->columnsType) {
+        if (isset($this->columnsType)) {
             return $this->columnsType;
         }
 
@@ -81,6 +81,12 @@ class SqliteStatement extends AbstractStatement
             }
         }
 
+        ob_start();
+        $this->debugDumpParams();
+        $r = ob_get_contents();
+        ob_end_clean();
+        error_log($r);
+
         return $this->columnsType;
     }