diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php index bd40bc29..d1569041 100644 --- a/library/Director/Data/Db/DbObject.php +++ b/library/Director/Data/Db/DbObject.php @@ -267,6 +267,9 @@ abstract class DbObject { if (array_key_exists($key, $this->properties)) { return true; + } elseif ($key === 'id') { + // There is getId, would give false positive + return false; } $func = 'get' . ucfirst($key); if (substr($func, -2) === '[]') { diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index 4396173a..8478e13c 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -579,7 +579,7 @@ abstract class DirectorObjectForm extends DirectorForm $object->getUrlParams() ); } elseif ($object->hasProperty('id')) { - $this->setSuccessUrl($this->getSuccessUrl()->with('id', $object->get('id'))); + $this->setSuccessUrl($this->getSuccessUrl()->with('id', $object->getProperty('id'))); } }