Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119808

jasenko_b on "[Plugin: WP Post Thumbnail] Sollution for Warning: get_class() expects parameter 1 to be object...on line 70"

$
0
0

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 all articles
Browse latest Browse all 119808

Trending Articles