From e2d4ef4d426bf13d86cf983cba59598eb81afa20 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Sun, 20 Dec 2015 13:10:38 +0300 Subject: [PATCH] issue #380. reset object before exception in _prepareQuery. --- MysqliDb.php | 1 + 1 file changed, 1 insertion(+) diff --git a/MysqliDb.php b/MysqliDb.php index f9186a62..aa099b00 100644 --- a/MysqliDb.php +++ b/MysqliDb.php @@ -1469,6 +1469,7 @@ protected function _buildLimit($numRows) protected function _prepareQuery() { if (!$stmt = $this->mysqli()->prepare($this->_query)) { + $this->reset(); throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error); }