Fatal error
-
One site was getting this on Friday:
PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /var/www/<site>/wp-content/plugins/gazchaps-woocommerce-getaddress-io/class.checkout.php:34My line 34 now looks like this:
if (is_wp_error($result)) {
$msgs = implode(‘, ‘, $result->get_error_messages());
$output = array(
‘error’ =>__$msgs,
‘error_code’ => 401, // appropriate?
);
wp_die( json_encode( $output ) );
}
|A bit quick and dirty, I know.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Fatal error’ is closed to new replies.