From 04fb2f6fc8a49498a8de0600e5e9b4172b27b5f0 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 20 Nov 2010 10:09:20 +0000 Subject: 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 --- engine/classes/ElggEntity.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/classes/ElggEntity.php') 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 -- cgit v1.2.3