aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-31 00:44:41 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-31 00:44:41 +0000
commit0c70cbd09644c3c38f3cb1a1857ff8b77607c945 (patch)
tree907ac46be632e17a10237844ae35fb275d6e8d92
parentb3a1bb6ac48a76a9f3327c1d4606f57918052f7f (diff)
downloadelgg-0c70cbd09644c3c38f3cb1a1857ff8b77607c945.tar.gz
elgg-0c70cbd09644c3c38f3cb1a1857ff8b77607c945.tar.bz2
Refs #2597: Auto-initialize temp_metadata, temp_annotations, and volatile as arrays
git-svn-id: http://code.elgg.org/elgg/trunk@7162 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/classes/ElggEntity.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index a21e9a057..7532bd9dd 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -46,20 +46,19 @@ abstract class ElggEntity extends ElggData implements
* Holds metadata until entity is saved. Once the entity is saved,
* metadata are written immediately to the database.
*/
- protected $temp_metadata;
+ protected $temp_metadata = array();
/**
* Holds annotations until entity is saved. Once the entity is saved,
* annotations are written immediately to the database.
*/
- protected $temp_annotations;
-
+ protected $temp_annotations = array();
/**
* Volatile data structure for this object, allows for storage of data
* in-memory that isn't sync'd back to the metadata table.
*/
- protected $volatile;
+ protected $volatile = array();
/**
* Initialise the attributes array.
@@ -87,16 +86,6 @@ abstract class ElggEntity extends ElggData implements
initialise_entity_cache();
- if (!is_array($this->temp_metadata)) {
- $this->temp_metadata = array();
- }
- if (!is_array($this->temp_annotations)) {
- $this->temp_annotations = array();
- }
- if (!is_array($this->volatile)) {
- $this->volatile = array();
- }
-
$this->attributes['guid'] = "";
$this->attributes['type'] = "";
$this->attributes['subtype'] = "";