1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

If id field is not there, do not attempt to key array on it

This commit is contained in:
Svemir Brkic 2011-10-14 21:51:04 -04:00
parent 97f38b4e27
commit d846041b27

View file

@ -593,7 +593,7 @@ abstract class LiskDAO {
foreach ($rows as $row) { foreach ($rows as $row) {
$obj = clone $this; $obj = clone $this;
if ($id_key) { if ($id_key && isset($row[$id_key])) {
$result[$row[$id_key]] = $obj->loadFromArray($row); $result[$row[$id_key]] = $obj->loadFromArray($row);
} else { } else {
$result[] = $obj->loadFromArray($row); $result[] = $obj->loadFromArray($row);