Title: &quot;Get Class&quot; Error
Last modified: August 21, 2016

---

# "Get Class" Error

 *  [Christine](https://wordpress.org/support/users/crhodes/)
 * (@crhodes)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-class-error/)
 * I am having the same issue as a user that posted earlier (different line #):
 * Warning: get_class() expects parameter 1 to be object, string given in
    wp-content/
   plugins/restrict-widgets/restrict-widgets.php on line 218
 * …to which you replied that the get_class() function doesn’t even exist in your
   plugin. Well, yes, it does. And it’s causing problems. Don’t know if it’s been
   added since the other user posted (3 months ago) but I’ve had to use another 
   widget control plugin for now.
 * [http://wordpress.org/plugins/restrict-widgets/](http://wordpress.org/plugins/restrict-widgets/)

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

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-class-error/#post-4162718)
 * You’re right – we’re using this PHP function.
 * Can you tell us more about the issue – when it happens, in what circumstances.
   It’s hard to find the problem without that info.
 *  [FriendlyWP](https://wordpress.org/support/users/mmcginnis/)
 * (@mmcginnis)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/get-class-error/#post-4162860)
 * I’m seeing this too, when looking at a site in IE8 specifically. I suspect this
   happens when there’s an old widget/plugin active (one that doesn’t use the “new”
   Widgets API.
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/get-class-error/#post-4162861)
 * Exactly. We’ll prepare an update for that, even though we believe that every 
   widget should be coded using Widgets API you mention. Unfortunatelly, some of
   the plugins/widgets authors just don’t care.

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

The topic ‘"Get Class" Error’ is closed to new replies.

 * ![](https://ps.w.org/restrict-widgets/assets/icon-256x256.png?rev=1018448)
 * [Restrict Widgets](https://wordpress.org/plugins/restrict-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-widgets/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [dFactory](https://wordpress.org/support/users/dfactory/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/get-class-error/#post-4162861)
 * Status: not resolved