{"id":3744761,"date":"2013-05-12T19:38:54","date_gmt":"2013-05-12T19:38:54","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/theme-problem-with-posts\/"},"modified":"2016-08-21T00:57:35","modified_gmt":"2016-08-21T00:57:35","slug":"theme-problem-with-posts","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/theme-problem-with-posts\/","title":{"rendered":"Theme Problem with Posts"},"content":{"rendered":"<p>I&#8217;m using the Reaction theme from Theme Forest and get this error whenever I add a post: <\/p>\n<p>Catchable fatal error: Object of class WP_Error could not be converted to string in &#8230;\/wp-content\/themes\/reaction-2.0\/functions\/image_resize.php on line 118<\/p>\n<p>Posts display properly on the top level page, but linking from that or any other link to the post itself results in the above error message. <\/p>\n<p>Here is the code in question:<\/p>\n<p>\t\t\/\/ no cache files &#8211; let&#8217;s finally resize it<br \/>\n\t\t$new_img_path = image_resize( $file_path, $width, $height, $crop );<br \/>\n\t\t$new_img_size = getimagesize( $new_img_path );<br \/>\n\t\t$new_img = str_replace( basename( $image_src[0] ), basename( $new_img_path ), $image_src[0] );<\/p>\n<p>Any ideas how I can fix this?<\/p>\n","protected":false},"template":"","class_list":["post-3744761","topic","type-topic","status-closed","hentry","topic-tag-post"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3744761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3744761\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3744761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}