]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better check on object (use instanceof wherever possible)
authorRoland Haeder <roland@mxchange.org>
Fri, 2 Sep 2016 19:08:48 +0000 (21:08 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:21:44 +0000 (00:21 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
classes/Profile.php

index 4b5badc66301b8bfdcb54129ad563e847bad15d9..8457258574578d389a5bda64b761ff6379e5d9a8 100644 (file)
@@ -1111,7 +1111,7 @@ class Profile extends Managed_DataObject
             // Check if user has a personal setting for this
             $prefs = User_location_prefs::getKV('user_id', $this->id);
 
-            if (!empty($prefs)) {
+            if ($prefs instanceof User_location_prefs) {
                 $share = $prefs->share_location;
                 $prefs->free();
             }