Allow Objects with no Id, they can't be cached but can be used.

pull/3779/head
Isaac Connor 2023-10-20 14:01:55 -04:00
parent f650d300d4
commit 7824613e53
1 changed files with 4 additions and 4 deletions

View File

@ -32,13 +32,13 @@ class ZM_Object {
}
if ( $row ) {
if (!isset($row['Id'])) {
Error("No Id in " . print_r($row, true));
return;
}
foreach ($row as $k => $v) {
$this->$k = $v;
}
if (!isset($row['Id'])) {
Debug("No Id in " . print_r($row, true));
return;
}
global $object_cache;
if (!isset($object_cache[$class])) {
$object_cache[$class] = array();