Lack of error handling on MPGS response
-
The response from MPGS (line 386 to 429 of woo-mags.php) could really benefit from error handling.
I would suggest to wrap it with
if( !is_wp_error ( $response_json ) ) {...}
This will prevent fatal error such as this one
PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/xxxxx/public_html/wp-content/plugins/woo-mpgs/woo-mpgs.php:405
- The topic ‘Lack of error handling on MPGS response’ is closed to new replies.