$pagenow / vars.php refactoring / Move $pagenow generation into it's own function
|Reported by:||hakre||Owned by:|
In wp-include/vars.php an unset variable is passed by referecence to preg_match() in mutliple places.
The same code-fragment where that problem is located does poisen the globale variable table with temporary variables as well.
To prevent these problems, the variable needs to be set prior to be passed to preg_match and the code fragment needs to be refactored in it's own function.
This might be helpful a bit as well when we start to free the codebase from hardencoded /wp-admin/ admin directory definitions.