From: Mikael Nordfeldth Date: Thu, 19 Sep 2013 14:37:39 +0000 (+0200) Subject: instanceof instead of is_a is faster (thanks quix0r) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a35344eb00686113f0bf170159d7f8966fa2f052;p=quix0rs-gnu-social.git instanceof instead of is_a is faster (thanks quix0r) --- diff --git a/classes/Profile.php b/classes/Profile.php index 5d7946bcd8..51b1fb72a8 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -89,7 +89,7 @@ class Profile extends Managed_DataObject if ($this->_user === -1) { $this->_user = User::getKV('id', $this->id); } - if (!is_a($this->_user, 'User')) { + if (!($this->_user instanceof User)) { throw new NoSuchUserException(array('id'=>$this->id)); }