Opened 13 years ago
Closed 13 years ago
#26867 closed defect (bug) (fixed)
Explicitly globalize some missing query globals in wp-settings.php
| Reported by: | nbachiyski | Owned by: | nbachiyski |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Unit Tests | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
When WordPress is loaded in a function (e.g. unit tests) the variables initialized at the top level aren't globals, but we expect them to be.
For example, if in a unit test there is no way to access $wp_query, either directly or via get_query_var() before some other part of the code has initialized it.
This happens especially when we are testing a plugin and it uses $wp_query in its initialization routine.
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looks good.