From: nickw Date: Tue, 24 Nov 2009 21:30:42 +0000 (+0000) Subject: Fixing a bug resulting from get_loggedin_user() return FALSE. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=91a13cc33a514baf9aa5f8b31b1810c354d93beb;p=lorea%2Felgg.git Fixing a bug resulting from get_loggedin_user() return FALSE. This bug could throw a fatal error to non-loggedin users. git-svn-id: http://code.elgg.org/elgg/trunk@3707 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/engine/lib/entities.php b/engine/lib/entities.php index df8cc2f7f..ef99f764a 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2665,7 +2665,7 @@ function can_edit_entity($entity_guid, $user_guid = 0) { $return = false; // Test user if possible - should default to false unless a plugin hook says otherwise - if (!is_null($user)) { + if ($user) { if ($entity->getOwner() == $user->getGUID()) { $return = true; }