From db3d1efabebc73c936dc25975e560a5227afff99 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 2 Sep 2016 21:08:48 +0200 Subject: [PATCH] Better check on object (use instanceof wherever possible) Signed-off-by: Roland Haeder --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 4b5badc663..8457258574 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -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(); } -- 2.39.5