PHP Fatal Error when api.contentclick.co.uk is down
-
The function cc_api_request() in contentclick/includes/functions.php makes an API call to api.contentclick.co.uk, via the WP_Http class
If this API call fails, then a WP_Error object comes back…. which the code in cc_api_request() is not anticipating – and it attempts to access it as an array. Result: PHP Fatal Error.
$request = new WP_Http; $result = $request->request( $url.$query_string_post ); if(isset($result['body'])){i.e. if api.contentclick.co.uk is down, then your WordPress site will go down too. 🙁
PHP Fatal error: Cannot use object of type WP_Error as array in wp-content/plugins/contentclick/includes/functions.php on line 20
David
The topic ‘PHP Fatal Error when api.contentclick.co.uk is down’ is closed to new replies.