Skip to content

Commit

Permalink
intval => absint
Browse files Browse the repository at this point in the history
Post IDs are supposed to be non-negative integers.

Co-authored-by: George Mamadashvili <[email protected]>
  • Loading branch information
tyxla and Mamaduka authored Jul 26, 2023
1 parent 2931e45 commit b10ca33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/experimental/disable-tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function gutenberg_post_being_edited_requires_classic_block() {
}

// Bail if for some reason the post isn't found.
$current_post = get_post( intval( $_GET['post'] ) );
$current_post = get_post( absint( $_GET['post'] ) );
if ( ! $current_post || is_wp_error( $current_post ) ) {
return false;
}
Expand Down

0 comments on commit b10ca33

Please sign in to comment.