Skip to content

Commit 3874194

Browse files
committed
Avoid out of memory bug in php 5.2 and 5.3
1 parent cff0cab commit 3874194

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

MysqliDb.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,12 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
737737
$parameters[] = & $row[$field->name];
738738
}
739739

740+
// avoid out of memory bug in php 5.2 and 5.3
741+
// https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/119
742+
if (version_compare (phpversion(), '5.4', '<'))
743+
$stmt->store_result();
744+
}
745+
740746
call_user_func_array(array($stmt, 'bind_result'), $parameters);
741747

742748
while ($stmt->fetch()) {

0 commit comments

Comments
 (0)