From 03ad5f7376a530715e728072b7489c05194a5bfa Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 10 Jun 2015 19:12:07 +0200 Subject: [PATCH] DbObject: do not treat an empty string as null --- library/Director/Data/Db/DbObject.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php index 283f4bd9..a8d684a7 100644 --- a/library/Director/Data/Db/DbObject.php +++ b/library/Director/Data/Db/DbObject.php @@ -183,7 +183,6 @@ abstract class DbObject */ protected function onDelete() {} - /** * Set DB adapter * @@ -246,9 +245,7 @@ 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)); }