diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 10:09:20 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 10:09:20 +0000 |
commit | 04fb2f6fc8a49498a8de0600e5e9b4172b27b5f0 (patch) | |
tree | dbcb922c81962e2c960c1b1f0a101aeb0b987304 /engine/classes | |
parent | 2b0f287c514a4e77365455212a43a77b608bd6c2 (diff) | |
download | elgg-04fb2f6fc8a49498a8de0600e5e9b4172b27b5f0.tar.gz elgg-04fb2f6fc8a49498a8de0600e5e9b4172b27b5f0.tar.bz2 |
Fixes #2490: attributes initialize to NULL instead of empty string or 0. Updated tests to reflect this
git-svn-id: http://code.elgg.org/elgg/trunk@7376 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r-- | engine/classes/ElggData.php | 2 | ||||
-rw-r--r-- | engine/classes/ElggEntity.php | 12 | ||||
-rw-r--r-- | engine/classes/ElggExtender.php | 2 | ||||
-rw-r--r-- | engine/classes/ElggGroup.php | 4 | ||||
-rw-r--r-- | engine/classes/ElggObject.php | 4 | ||||
-rw-r--r-- | engine/classes/ElggSite.php | 6 | ||||
-rw-r--r-- | engine/classes/ElggUser.php | 14 |
7 files changed, 22 insertions, 22 deletions
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php index 96de1bc8f..a6cf7d21f 100644 --- a/engine/classes/ElggData.php +++ b/engine/classes/ElggData.php @@ -36,7 +36,7 @@ abstract class ElggData implements $this->attributes = array(); } - $this->attributes['time_created'] = ''; + $this->attributes['time_created'] = NULL; } /** diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 0cf3da8fa..667302c30 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -84,17 +84,17 @@ abstract class ElggEntity extends ElggData implements protected function initializeAttributes() { parent::initializeAttributes(); - $this->attributes['guid'] = ""; - $this->attributes['type'] = ""; - $this->attributes['subtype'] = ""; + $this->attributes['guid'] = NULL; + $this->attributes['type'] = NULL; + $this->attributes['subtype'] = NULL; $this->attributes['owner_guid'] = get_loggedin_userid(); $this->attributes['container_guid'] = get_loggedin_userid(); - $this->attributes['site_guid'] = 0; + $this->attributes['site_guid'] = NULL; $this->attributes['access_id'] = ACCESS_PRIVATE; - $this->attributes['time_updated'] = ""; - $this->attributes['last_action'] = ''; + $this->attributes['time_updated'] = NULL; + $this->attributes['last_action'] = NULL; $this->attributes['enabled'] = "yes"; // There now follows a bit of a hack diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index 78ccea395..95a4d3de3 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -22,7 +22,7 @@ abstract class ElggExtender extends ElggData protected function initializeAttributes() { parent::initializeAttributes(); - $this->attributes['type'] = ''; + $this->attributes['type'] = NULL; } /** diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php index 71b2a37d4..448c1f7a6 100644 --- a/engine/classes/ElggGroup.php +++ b/engine/classes/ElggGroup.php @@ -33,8 +33,8 @@ class ElggGroup extends ElggEntity parent::initializeAttributes(); $this->attributes['type'] = "group"; - $this->attributes['name'] = ""; - $this->attributes['description'] = ""; + $this->attributes['name'] = NULL; + $this->attributes['description'] = NULL; $this->attributes['tables_split'] = 2; } diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php index a808f4b9f..74c7be248 100644 --- a/engine/classes/ElggObject.php +++ b/engine/classes/ElggObject.php @@ -40,8 +40,8 @@ class ElggObject extends ElggEntity { parent::initializeAttributes(); $this->attributes['type'] = "object"; - $this->attributes['title'] = ""; - $this->attributes['description'] = ""; + $this->attributes['title'] = NULL; + $this->attributes['description'] = NULL; $this->attributes['tables_split'] = 2; } diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php index 70ad395fe..da239f1be 100644 --- a/engine/classes/ElggSite.php +++ b/engine/classes/ElggSite.php @@ -51,9 +51,9 @@ class ElggSite extends ElggEntity { parent::initializeAttributes(); $this->attributes['type'] = "site"; - $this->attributes['name'] = ""; - $this->attributes['description'] = ""; - $this->attributes['url'] = ""; + $this->attributes['name'] = NULL; + $this->attributes['description'] = NULL; + $this->attributes['url'] = NULL; $this->attributes['tables_split'] = 2; } diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php index cb2d565fc..8f30be37e 100644 --- a/engine/classes/ElggUser.php +++ b/engine/classes/ElggUser.php @@ -37,13 +37,13 @@ class ElggUser extends ElggEntity parent::initializeAttributes(); $this->attributes['type'] = "user"; - $this->attributes['name'] = ""; - $this->attributes['username'] = ""; - $this->attributes['password'] = ""; - $this->attributes['salt'] = ""; - $this->attributes['email'] = ""; - $this->attributes['language'] = ""; - $this->attributes['code'] = ""; + $this->attributes['name'] = NULL; + $this->attributes['username'] = NULL; + $this->attributes['password'] = NULL; + $this->attributes['salt'] = NULL; + $this->attributes['email'] = NULL; + $this->attributes['language'] = NULL; + $this->attributes['code'] = NULL; $this->attributes['banned'] = "no"; $this->attributes['admin'] = 'no'; $this->attributes['tables_split'] = 2; |