Fix mysqli::fetch_all not supported in some php version

This commit is contained in:
ohartl 2016-02-20 20:41:41 +01:00
parent 2cf74eafc7
commit 084c2abd0e

View file

@ -200,7 +200,13 @@ abstract class AbstractModel
*/
public static function createMultipleFromDbResult($result)
{
return static::createMultiple($result->fetch_all(MYSQLI_ASSOC));
$rows = array();
while($row = $result->fetch_assoc()) {
$rows[] = $row;
}
return static::createMultiple($rows);
}