From a35344eb00686113f0bf170159d7f8966fa2f052 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 19 Sep 2013 16:37:39 +0200 Subject: [PATCH] instanceof instead of is_a is faster (thanks quix0r) --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }