[wp-trac] [WordPress Trac] #30958: admin.php should properly set "now" globals

WordPress Trac noreply at wordpress.org
Thu Jan 8 22:45:17 UTC 2015


#30958: admin.php should properly set "now" globals
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  4.2
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------------

Comment (by wonderboymusic):

 ok - I can back out the `isset()` removals.

 `global $var` ends up being the equiv of `$var = null` - most of the
 checks for plugin pages were doing:
 * Is it set at all?
 * Now let me check it is an array key

 `isset()` would pass for `$var = ''`, which is why truthy/falsely seemed
 to work instead - but anyone else checking `isset()` in a plugin might
 experience side effects since it may no longer be `null` in some cases.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30958#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list