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

Merge pull request #68 from Symplicity/patch1

If id field is not there, do not attempt to key array on it
This commit is contained in:
Evan Priestley 2011-10-15 13:17:15 -07:00
commit 84301044ab

View file

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