[wp-trac] [WordPress Trac] #33545: Check for existence of pagenow global
WordPress Trac
noreply at wordpress.org
Tue Aug 25 19:22:09 UTC 2015
#33545: Check for existence of pagenow global
----------------------------+-----------------------------
Reporter: KalenJohnson | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 4.3
Severity: normal | Keywords:
Focuses: template |
----------------------------+-----------------------------
There are some plugins that call `home_url()` or `get_home_url()` without
being in any type of hook, so it's happening right when the plugin get's
loaded. It doesn't seem like this is always an issue, but I am seeing many
warnings of an undefined index.
This patch I don't believe will break anything, since if things are being
loaded before the `$pagenow` global exists, this check won't work anyways,
so checking for it and removing a PHP warning seems like a win.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33545>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list