aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggEntity.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
committerSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
commit9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch)
tree87377f7b889efc639935508556beb9baf010e821 /engine/classes/ElggEntity.php
parent24690ed95198c093e6fbb91a94b5d0544c740f89 (diff)
downloadelgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz
elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'engine/classes/ElggEntity.php')
-rw-r--r--engine/classes/ElggEntity.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 2fa8e9939..dc38dafbe 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -1311,12 +1311,16 @@ abstract class ElggEntity extends ElggData implements
/**
* Loads attributes from the entities table into the object.
*
- * @param int $guid GUID of Entity
+ * @param mixed $guid GUID of entity or stdClass object from entities table
*
* @return bool
*/
protected function load($guid) {
- $row = get_entity_as_row($guid);
+ if ($guid instanceof stdClass) {
+ $row = $guid;
+ } else {
+ $row = get_entity_as_row($guid);
+ }
if ($row) {
// Create the array if necessary - all subclasses should test before creating