aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 1750f12e1..e6c2baa8e 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -801,7 +801,9 @@ abstract class ElggEntity implements
$this->attributes['subtype'] = get_subtype_id($this->attributes['type'], $this->attributes['subtype']);
// Cache object handle
- if ($this->attributes['guid']) cache_entity($this);
+ if ($this->attributes['guid']) {
+ cache_entity($this);
+ }
return $this->attributes['guid'];
}
@@ -1693,21 +1695,24 @@ function entity_row_to_elggstar($row) {
if (!($new_entity instanceof ElggEntity)) {
throw new ClassException(sprintf(elgg_echo('ClassException:ClassnameNotClass'), $classname, 'ElggEntity'));
}
- }
- else {
+ } else {
error_log(sprintf(elgg_echo('ClassNotFoundException:MissingClass'), $classname));
}
}
else {
switch ($row->type) {
case 'object' :
- $new_entity = new ElggObject($row); break;
+ $new_entity = new ElggObject($row);
+ break;
case 'user' :
- $new_entity = new ElggUser($row); break;
+ $new_entity = new ElggUser($row);
+ break;
case 'group' :
- $new_entity = new ElggGroup($row); break;
+ $new_entity = new ElggGroup($row);
+ break;
case 'site' :
- $new_entity = new ElggSite($row); break;
+ $new_entity = new ElggSite($row);
+ break;
default:
throw new InstallationException(sprintf(elgg_echo('InstallationException:TypeNotSupported'), $row->type));
}