Commit 00a6b478 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #383 from avbdr/master

issue #380. reset object before exception in _prepareQuery.
parents 949996fa e2d4ef4d
...@@ -1469,6 +1469,7 @@ class MysqliDb ...@@ -1469,6 +1469,7 @@ class MysqliDb
protected function _prepareQuery() protected function _prepareQuery()
{ {
if (!$stmt = $this->mysqli()->prepare($this->_query)) { if (!$stmt = $this->mysqli()->prepare($this->_query)) {
$this->reset();
throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error); throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment