diff --git a/src/Docnet/DB.php b/src/Docnet/DB.php index 1f39e23..40c1aef 100644 --- a/src/Docnet/DB.php +++ b/src/Docnet/DB.php @@ -95,6 +95,7 @@ public function commit() if (!$this->obj_db->commit()) { throw new \Exception("MySQL failed to commit the transaction"); } + $this->bol_in_transaction = FALSE; return $this; } @@ -113,6 +114,7 @@ public function rollback() if (!$this->obj_db->rollback()) { throw new \Exception("MySQL failed to rollback the transaction"); } + $this->bol_in_transaction = FALSE; return $this; } @@ -257,4 +259,4 @@ public function __destruct() } } -} \ No newline at end of file +} diff --git a/src/Docnet/DB/Statement.php b/src/Docnet/DB/Statement.php index 65ac173..72d71f0 100644 --- a/src/Docnet/DB/Statement.php +++ b/src/Docnet/DB/Statement.php @@ -551,7 +551,8 @@ private function bindParameters() */ private function isAssoc(array $arr) { - return (gettype(array_keys($arr)[0]) == "string"); + $arr_keys = array_keys($arr); + return (gettype($arr_keys[0]) == "string"); } /**