diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php index a8d684a7..283f4bd9 100644 --- a/library/Director/Data/Db/DbObject.php +++ b/library/Director/Data/Db/DbObject.php @@ -183,6 +183,7 @@ abstract class DbObject */ protected function onDelete() {} + /** * Set DB adapter * @@ -245,7 +246,9 @@ abstract class DbObject public function set($key, $value) { $key = (string) $key; - + if ($value === '') { + $value = null; + } if (! $this->hasProperty($key)) { throw new Exception(sprintf('Trying to set invalid key %s', $key)); }