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=87b1032ea677f78f66f310d9dff492602111d702;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 7aae98fb5f..74535a16bd 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -1067,7 +1067,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(); }