Opened 15 years ago
Closed 15 years ago
#18966 closed defect (bug) (fixed)
Notice when HTTP_USER_AGENT not set
| Reported by: | scribu | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Administration | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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
@
15 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
@
15 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
@
15 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
While attempting to fix this, I noticed two things:
Hence, the _wp_admin_html_begin() function in 18966.diff.