Skip to content

Commit

Permalink
Fix repeat fetching of POST variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hanifn committed Jun 14, 2024
1 parent 4ce2556 commit d757db0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/notifications/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ public function ajax_save_post_subscriptions() {
// Determine if any of the selected users won't have notification access
$subscribers_with_no_access = array_filter(
$user_group_ids,
function ( $user_id ) {
$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
function ( $user_id ) use ( $post_id ) {
return ! $this->user_can_be_notified( get_user_by( 'id', $user_id ), $post_id );
}
);
Expand Down

0 comments on commit d757db0

Please sign in to comment.