CRITICAL Uncaught Error: Call to a member function get_error_message()
-
2025-01-14T17:20:04+00:00 CRITICAL Uncaught Error: Call to a member function get_error_message() on array in /wp-content/plugins/omnisend-connect/manager/class-omnisend-logs-sender.php:36
Stack trace: 0 /wp-content/plugins/omnisend-connect/includes/class-omnisend-logs.php(75): Omnisend_Logs_Sender::send() 1 /wp-content/plugins/omnisend-connect/includes/class-omnisend-logs.php(53): Omnisend_Logs::send() 2 /wp-content/plugins/omnisend-connect/includes/class-omnisend-logs.php(16): Omnisend_Logs::sync() 3 /wp-includes/class-wp-hook.php(324): omnisend_sync_logs() 4 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 5 /wp-includes/plugin.php(565): WP_Hook->do_action() 6 /wp-cron.php(191): do_action_ref_array() 7 {main}thr in /wp-content/plugins/omnisend-connect/manager/class-omnisend-logs-sender.php on line 36
Need to change the codeif ( is_wp_error( $response ) || ! $response_success ) {
Omnisend_Logger::debug( $response->get_error_message() );
return false;
}to
if ( is_wp_error( $response ) ) {
Omnisend_Logger::debug( $response->get_error_message() );
return false;
}
if ( ! $response_success ) {
Omnisend_Logger::debug( 'Request failed with response code: ' . $response_code );
return false;
}
The topic ‘CRITICAL Uncaught Error: Call to a member function get_error_message()’ is closed to new replies.