diff options
-rw-r--r-- | engine/lib/objects.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 1e3fd818f..f8a4387f3 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -335,8 +335,8 @@ private $attributes = array();
function __get($name) {
- if (isset($attributes[$name])) {
- return $attributes[$name];
+ if (isset($this->attributes[$name])) {
+ return $this->attributes[$name];
}
return null;
}
@@ -346,7 +346,10 @@ return true;
}
- function __construct($id = null) {
+ function __construct($id = null) { + + $this->attributes = array(); +
if (!empty($id)) {
if ($object = get_object($id)) {
$objarray = (array) $object;
|