]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
instanceof instead of is_a is faster (thanks quix0r)
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 19 Sep 2013 14:37:39 +0000 (16:37 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 19 Sep 2013 14:40:16 +0000 (16:40 +0200)
classes/Profile.php

index 5d7946bcd8d0f93b0fe6d8957ea3998f79d9de87..51b1fb72a87500911a895eebf3f25c102e977f43 100644 (file)
@@ -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));
         }