Skip to content

Commit

Permalink
Merge pull request #667 from Automattic/fix/pass-variable-reference
Browse files Browse the repository at this point in the history
Fixes non-variable being passed by reference
  • Loading branch information
mikeyarce authored Jun 15, 2021
2 parents 2f9d9f5 + 17c773b commit 25672a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/php/screen-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ function ajax_save_callback(){
}

//The 'action' argument is in the form "save_settings-panel_id"
$id = end(explode('-', $_POST['action'], 2));
$ids = explode( '-', $_POST['action'], 2 );
$id = end( $ids );

//Basic security check.
check_ajax_referer('save_settings-' . $id, '_wpnonce-' . $id);
Expand Down

0 comments on commit 25672a3

Please sign in to comment.