DbObject: Fix wrong type comparison

This commit is contained in:
Alexander Fuhr 2015-06-23 16:02:54 +02:00
parent f1595738e3
commit 040dbdbb99
1 changed files with 7 additions and 1 deletions

View File

@ -505,7 +505,13 @@ abstract class DbObject
$key
));
}
$this->properties[$key] = $val;
if ($val === null) {
$this->properties[$key] = null;
} elseif (is_resource($val)) {
$this->properties[$key] = stream_get_contents($val);
} else {
$this->properties[$key] = (string) $val;
}
}
$this->loadedFromDb = true;
$this->loadedProperties = $this->properties;