]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixing a bug resulting from get_loggedin_user() return FALSE.
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 24 Nov 2009 21:30:42 +0000 (21:30 +0000)
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 24 Nov 2009 21:30:42 +0000 (21:30 +0000)
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

engine/lib/entities.php

index df8cc2f7f72453f50c3ab1099dc597082dbbfe3b..ef99f764a2da8726baa132343f07ae3b75ed2d67 100644 (file)
@@ -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;
                        }