From 04f3371f91b8ae260f9071ba500e945df4e38772 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Mon, 9 Sep 2024 18:17:09 +0530 Subject: [PATCH] fix: Refactor RTMediaAdmin.php to handle JSON decoding error --- app/admin/RTMediaAdmin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/RTMediaAdmin.php b/app/admin/RTMediaAdmin.php index 921f01d0e..88fe2c492 100755 --- a/app/admin/RTMediaAdmin.php +++ b/app/admin/RTMediaAdmin.php @@ -1444,7 +1444,7 @@ public function import_settings( $file_path ) { wp_send_json( $response ); } - $settings_data = json_decode( $settings_data_json, true ); + $settings_data = $settings_data_json; if ( ! is_array( $settings_data ) || empty( $settings_data['rtm_key'] ) ) { $response['rtm_response'] = 'error'; $response['rtm_response_msg'] = esc_html__( 'Invalid JSON Supplied!', 'buddypress-media' );