| @@ -98,11 +98,11 @@ | ||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | global $uwp_notices; |
| 101 | 101 | $user_id = get_current_user_id(); |
| 102 | - $uwp_mute_notifications = isset($_POST['uwp_mute_notifications']) ? $_POST['uwp_mute_notifications'] : array(); | |
| 103 | - | |
| 104 | - update_user_meta($user_id, 'uwp_mute_notifications', array_map('uwp_clean', $uwp_mute_notifications)); | |
| 102 | + if (isset($_POST['uwp_mute_notifications']) && !empty($_POST['uwp_mute_notifications'])) { | |
| 103 | + update_user_meta($user_id, 'uwp_mute_notifications', array_map('uwp_clean', (array) $_POST['uwp_mute_notifications'])); | |
| 104 | + } | |
| 105 | 105 | |
| 106 | 106 | $message = apply_filters('uwp_notification_update_success_message', __('Notification settings updated successfully.', 'userswp')); |
| 107 | 107 | $message = aui()->alert(array( |
| 108 | 108 | 'type'=>'success', |