diff options
author | Cash Costello <cash.costello@gmail.com> | 2013-06-18 05:26:23 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-06-18 05:26:23 -0700 |
commit | d19322b7791d5a4ba52335b343f58d8059375bc5 (patch) | |
tree | 1a6fa412b52eaf5e34c80b9de4933b86ee0c800d /engine/lib/entities.php | |
parent | afb0cef118a59c86e649e0717748c299a05f2427 (diff) | |
parent | e29554909dc098f163a9dc6de31c42cd749ab4ae (diff) | |
download | elgg-d19322b7791d5a4ba52335b343f58d8059375bc5.tar.gz elgg-d19322b7791d5a4ba52335b343f58d8059375bc5.tar.bz2 |
Merge pull request #5641 from jeabakker/can-edit-entity-metadata
wrong default behaviour in can_edit_entity_metadata
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 072b26805..226cf5c6c 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -761,7 +761,7 @@ function get_entity($guid) { // @todo We need a single Memcache instance with a shared pool of namespace wrappers. This function would pull an instance from the pool. static $shared_cache; - // We could also use: if (!(int) $guid) { return FALSE }, + // We could also use: if (!(int) $guid) { return FALSE }, // but that evaluates to a false positive for $guid = TRUE. // This is a bit slower, but more thorough. if (!is_numeric($guid) || $guid === 0 || $guid === '0') { @@ -2126,7 +2126,7 @@ function can_edit_entity_metadata($entity_guid, $user_guid = 0, $metadata = null $return = null; - if ($metadata->owner_guid == 0) { + if ($metadata && ($metadata->owner_guid == 0)) { $return = true; } if (is_null($return)) { |