From 982b28f3ed14a94a6a3c667a1639c221c2198691 Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 6 Mar 2008 10:22:13 +0000 Subject: Fixed ElggObject attributes. git-svn-id: https://code.elgg.org/elgg/trunk@86 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/objects.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engine/lib/objects.php') 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; -- cgit v1.2.3