#13919 closed defect (bug) (wontfix)
$pagenow / vars.php refactoring / Move $pagenow generation into it's own function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Warnings/Notices | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
This patch introduces a new function called
wp_page()
inwp-includes/functions.php
. Both the name as the place is just an idea, I could not find a guide how to name a new function nor in which to place it. So let me know what makes more sense here.I just inserted in before the function that follows in the alphabetical order of funtion names. Is that what is intended?
I thought it is a good idea to decouple it from
$PHP_SELF
a bit by parameterizing it.