From: Roland Haeder Date: Fri, 2 Sep 2016 19:08:48 +0000 (+0200) Subject: Better check on object (use instanceof wherever possible) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db3d1efabebc73c936dc25975e560a5227afff99;p=quix0rs-gnu-social.git Better check on object (use instanceof wherever possible) Signed-off-by: Roland Haeder --- 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(); }