WordPress.org

Support

Support » Plugins and Hacks » Sollution for Warning: get_class() expects parameter 1 to be object…on line 70

Sollution for Warning: get_class() expects parameter 1 to be object…on line 70

  • I think that this one could help a lot of people out there. With the new version of php, currently running on more and more servers, wp-post-thumbnail generates a warning looking a bit like this:

    Warning: get_class() expects parameter 1 to be object, string given in ..[some url].. /wp-content/plugins/wp-post-thumbnail/wppt.php on line 70

    You can solve this by changing the content of line 70 in wppt.php into the following:

    if (strtolower(get_class($xml)) == ‘SimpleXMLElement’) {

    Just copy this instead of everything else in this line and you’re good to go. No more warnings 🙂

    http://wordpress.org/extend/plugins/wp-post-thumbnail/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sollution for Warning: get_class() expects parameter 1 to be object…on line 70’ is closed to new replies.