{"id":4697405,"date":"2014-03-11T19:34:51","date_gmt":"2014-03-11T19:34:51","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-with-wp_error\/"},"modified":"2016-08-21T17:11:11","modified_gmt":"2016-08-21T17:11:11","slug":"error-with-wp_error","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-with-wp_error\/","title":{"rendered":"Error with WP_Error"},"content":{"rendered":"<p>I&#8217;m seeing the following in my error_log every few days:<\/p>\n<p><code>PHP Fatal error:  Cannot use object of type WP_Error as array in plugins\/embed-github-gist\/embed-github-gist.php on line 86<\/code><\/p>\n<p>I took a look through the code and that line is: <code>$json = json_decode($result[&#039;body&#039;], true);<\/code>. Looks like if the <code>$result<\/code> var is an array, it should do this line, and if not it should do something else.<\/p>\n<p>Cheers,<br \/>\nJoshua<\/p>\n<p>https:\/\/wordpress.org\/plugins\/embed-github-gist\/<\/p>\n","protected":false},"template":"","class_list":["post-4697405","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4697405","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\/4697405\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4697405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}