WordPress.org

Make WordPress Core

Ticket #41171: 41171.2.patch

File 41171.2.patch, 627 bytes (added by umangvaghela123, 4 years ago)

Fix #41171 issue

  • wp-includes/vars.php

     
    2828                preg_match('#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
    2929        else
    3030                preg_match('#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
    31         $pagenow = $self_matches[1];
     31        $pagenow = !empty( $self_matches[1] ) ? $self_matches[1] : '';
    3232        $pagenow = trim($pagenow, '/');
    3333        $pagenow = preg_replace('#\?.*?$#', '', $pagenow);
    3434        if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) {