DbObject: do not treat an empty string as null

This commit is contained in:
Thomas Gelf 2015-06-10 19:12:07 +02:00
parent b74e1dc1c0
commit 03ad5f7376
1 changed files with 1 additions and 4 deletions

View File

@ -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));
}