#44205 closed defect (bug) (duplicate)
Trying to call a member function on a boolean value -
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | |
Focuses: | administration | Cc: |
Description
In wp-admin\includes\file.php on lines 1892-1895 you have:
$result = wp_mkdir_p( $exports_dir );
if ( is_wp_error( $result ) ) {
wp_send_json_error( $result->get_error_message() );
}
wp_mkdir_p( <string> );
returns a Boolean which means wp_send_json_error( $result->get_error_message() );
is invalid.
I assume it should be wp_send_json_error( $result ); // Or maybe add a status code.
https://developer.wordpress.org/reference/functions/wp_send_json_error/
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks @yrpwayne for the ticket, but this should be fixed in #44158 for the upcoming 4.9.7