WordPress.org

Ready to get started?Download WordPress

Forums

WP Post Thumbnail
Sollution for Warning: get_class() expects parameter 1 to be object...on line 70 (5 posts)

  1. jasenko_b
    Member
    Posted 1 year ago #

    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/

  2. JimmyHG
    Member
    Posted 1 year ago #

    Wow! I just registered on this forum to say "thank you" that really helped me :D

  3. jasenko_b
    Member
    Posted 1 year ago #

    You're welcome!

  4. José
    Member
    Posted 1 year ago #

    is working in wp 3.5 but I have this error...solutions?

    PHP Warning: Missing argument 2 for wpdb::prepare(), called in "wppt.php" on line 372 and defined in "wp-db.php" on line 990

    Thank You ^_^'

  5. jasenko_b
    Member
    Posted 1 year ago #

    Hmm.. Not sure. Maybe you can start a new toppic in the support forum:

    http://wordpress.org/support/plugin/wp-post-thumbnail

    It might help you getting your answer. Good luck!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic