diff --git a/include/class.orm.php b/include/class.orm.php index 1d8810919a1bab31a9ca853e88162a86d9de3902..29d474c4ce63927ba5dcbde56223d97fe7147a92 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -986,8 +986,6 @@ class MysqlExecutor { function _prepare() { $this->execute(); $this->_setup_output(); - if (!$this->stmt->store_result()) - throw new OrmException('Unable to process query: '.$this->stmt->error); } function execute() { @@ -996,7 +994,7 @@ class MysqlExecutor { .' '.$this->sql); if (count($this->params)) $this->_bind($this->params); - if (!$this->stmt->execute()) { + if (!$this->stmt->execute() || ! $this->stmt->store_result()) { throw new OrmException('Unable to execute query: ' . $this->stmt->error); } return true;