Skip to content

Commit 4008f66

Browse files
author
Woxxy
committed
Fixed HHVM-mysqli-multi_query error checking as HHVM 3.8 doesn't properly set error codes, but properly returns an error from the method multi_query itself
1 parent ded765b commit 4008f66

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/Drivers/Mysqli/Connection.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,11 @@ public function multiQuery(Array $queue)
231231

232232
$this->ping();
233233

234-
$this->getConnection()->multi_query(implode(';', $queue));
235-
236-
if ($this->getConnection()->error) {
234+
// HHVM bug (2015/07/07, HipHop VM 3.8.0-dev (rel)): $mysqli->error and $mysqli->errno aren't set
235+
if (!$this->getConnection()->multi_query(implode(';', $queue))) {
237236
throw new DatabaseException('['.$this->getConnection()->errno.'] '.
238237
$this->getConnection()->error.' [ '.implode(';', $queue).']');
239-
}
238+
};
240239

241240
return new MultiResultSet($this, $count);
242241
}

0 commit comments

Comments
 (0)