In some scenarios where `is_admin()` returns true but `$_SERVER['PHP_SELF']` does not match a `wp-admin/*` location, setting the `$pagenow` global could trigger a PHP warning: `Undefined array key 1`. This commit avoids the warning by checking whether the matches array is not empty. Props janh2, konradyoast, peterwilsoncc. Fixes #54700. Built from https://develop.svn.wordpress.org/trunk@53294 git-svn-id: http://core.svn.wordpress.org/trunk@52883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
5.7 KiB
5.7 KiB