Commit ad8608ba authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-689' into 2.4

parents c3448dc0 6d7df4c7
......@@ -169,6 +169,9 @@ class MysqliStatement implements \IteratorAggregate, Statement
if (null === $this->_columnNames) {
$meta = $this->_stmt->result_metadata();
if (false !== $meta) {
// We have a result.
$this->_stmt->store_result();
$columnNames = array();
foreach ($meta->fetch_fields() as $col) {
$columnNames[] = $col->name;
......@@ -191,11 +194,6 @@ class MysqliStatement implements \IteratorAggregate, Statement
}
}
// We have a result.
if (false !== $this->_columnNames) {
$this->_stmt->store_result();
}
return true;
}
......
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