Skip to content

Recoverable fatal error #262

@kleinermann

Description

@kleinermann

I get the following fatal error (see below after the warnings):

Warning: Illegal string offset 'original' in /Applications/MAMP/htdocs/bussenstueble.de/wordpress/wp-content/plugins/magic-fields-2/mf_front_end.php on line 523

Warning: Illegal string offset 'original' in /Applications/MAMP/htdocs/bussenstueble.de/wordpress/wp-content/plugins/magic-fields-2/mf_front_end.php on line 527

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mfthumb has a deprecated constructor in /Applications/MAMP/htdocs/bussenstueble.de/wordpress/wp-content/plugins/magic-fields-2/MF_thumb.php on line 12

Warning: Illegal string offset 'thumb' in /Applications/MAMP/htdocs/bussenstueble.de/wordpress/wp-content/plugins/magic-fields-2/mf_front_end.php on line 527

Recoverable fatal error: Object of class WP_Error could not be converted to string in /Applications/MAMP/htdocs/bussenstueble.de/wordpress/wp-content/plugins/magic-fields-2/mf_front_end.php on line 527

This only happens on my local test environment.

I have checked in mf_front_end.php. This is the code from line 523:

$result['original'] = $data[0];
 if( empty($options) ){
   $result['thumb'] = $result['original'];
}else{
   $result['thumb'] = aux_image($result['original'],$options,$type);
   if ( is_wp_error($result['thumb']) ){
      $result['error'] = $result['thumb']->get_error_message();
      $result['thumb'] = '';
    }
}

I've checked the $result variable and found that it contains an empty string, which causes the script to throw an error. I don't understand why the $result variable could be empty. I'd be very grateful for any tip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions