Title: is_a() causing errors with get_users()
Last modified: August 21, 2016

---

# is_a() causing errors with get_users()

 *  [dgdax](https://wordpress.org/support/users/dgdax/)
 * (@dgdax)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is_a-causing-errors-with-get_users/)
 * Running WordPress with Yii framework sub-site.
    Use of is_a() function in capabilities.
   php (line 486) is causing errors, since causes instantiation of a WP_User object–
   which is unknown to Yii.
 * is_a() was deprecated in PHP 5.0.0 – but did not cause this problem until PHP
   5.3.7, when its behaviour changed: if first argument is not an object, __autoload()
   is triggered. (see [php manual](http://http://www.php.net/manual/en/function.is-a.php))
 * Example: error if I use get_users() with the ‘all_with_meta’ option.
 * This is at least inefficient – and in my situation fatal! Even when it works,
   this generates unnecessary log warnings in many cases (see all the other posts)
 * Solution:
    replace: `if ( is_a( $id, 'WP_User' ) )` with: `if ( $id instanceof
   WP_User )`
 * Please can you fix this for increased compatibility in future versions – both
   with PHP and all the other plugins!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Chris Olbekson](https://wordpress.org/support/users/c3mdigital/)
 * (@c3mdigital)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is_a-causing-errors-with-get_users/#post-4248552)
 * Thanks for the information. It would be very helpful if you could file this as
   a bug report on the WordPress bug tracker, [http://core.trac.wordpress.org/newticket](http://core.trac.wordpress.org/newticket)
   so that it can be investigated further.
 *  Thread Starter [dgdax](https://wordpress.org/support/users/dgdax/)
 * (@dgdax)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is_a-causing-errors-with-get_users/#post-4248593)
 * Thanks Chris – I was trying to raise it as a bug, but didn’t find the link… Also
   feel better about doing it on your advice!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘is_a() causing errors with get_users()’ is closed to new replies.

## Tags

 * [deprecated function](https://wordpress.org/support/topic-tag/deprecated-function/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [dgdax](https://wordpress.org/support/users/dgdax/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/is_a-causing-errors-with-get_users/#post-4248593)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
