Opened 12 years ago
Closed 12 years ago
#18966 closed defect (bug) (fixed)
Notice when HTTP_USER_AGENT not set
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
In [18975], yet another global was introduced: $wp_htmltag_class.
Unlike the other globals ($is_winIE, $is_opera etc.), it doesn't check if $_SERVER['HTTP_USER_AGENT']
exists, causing a notice.
Attachments (3)
Change History (11)
#3
@
12 years ago
Yes, the patch makes sense. We could probably use it for other HTML headers in the admin too. The $wp_htmltag_class
was set as global to give access to plugins to modify it just like $is_IE, $is_Gecko, etc. but we can add a hook later if that's necessary.
#4
@
12 years ago
Most of the pages are handled in admin-header.php.
In 18966.2.diff, network/sites.php and upgrade.php are covered.
All the rest (install, setup-config and repair) don't seem to have the function available.
#5
@
12 years ago
Per IRC, let's go with the initial patch here, 18966.diff, but modify it so it uses boilerplate-like conditionals.
Other pages covered in 18966.2.diff are fine as well, but I don't really like the network admin conditional. Why not always use the root blog?
While attempting to fix this, I noticed two things:
Hence, the _wp_admin_html_begin() function in 18966.diff.