mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Properly check, initialize, or cast a number of variables. props ChenHui. see #14642.
git-svn-id: https://develop.svn.wordpress.org/trunk@16377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,12 +13,13 @@ $wp_list_table = get_list_table('WP_Posts_List_Table');
|
||||
$wp_list_table->check_permissions();
|
||||
|
||||
// Back-compat for viewing comments of an entry
|
||||
if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
|
||||
wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) );
|
||||
exit;
|
||||
} else {
|
||||
unset( $_redirect );
|
||||
foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) {
|
||||
if ( ! empty( $_REQUEST[ $_redirect ] ) ) {
|
||||
wp_redirect( admin_url( 'edit-comments.php?p=' . absint( $_REQUEST[ $_redirect ] ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
unset( $_redirect );
|
||||
|
||||
// Handle bulk actions
|
||||
$doaction = $wp_list_table->current_action();
|
||||
|
||||
Reference in New Issue
Block a user