Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#27374 closed defect (bug) (fixed)

Notice in comments-template.php for HTTP_USER_AGENT

Reported by: joostdevalk's profile joostdevalk Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.9 Priority: normal
Severity: normal Version: 0.71
Component: Comments Keywords: has-patch
Focuses: Cc:


This generates a notice when the user agent isn't set, on line 947 of comment-template.php currently:

if ( false !== stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') )

Simply checking whether HTTP_USER_AGENT is set would fix it, of course.

Attachments (1)

comment-template.diff (587 bytes) - added by joostdevalk 10 years ago.
Comment Template Patch

Download all attachments as: .zip

Change History (6)

10 years ago

Comment Template Patch

#1 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.9

Previously: #22979

#2 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 27514:

Avoid a notice in trackback_rdf() if user agent is not set.

props joostdevalk.
fixes #27374.

#3 @SergeyBiryukov
10 years ago

  • Version changed from trunk to 0.71

#4 follow-up: @nacin
10 years ago

When is HTTP_USER_AGENT not set? CLI?

#5 in reply to: ↑ 4 @joostdevalk
10 years ago

Replying to nacin:

When is HTTP_USER_AGENT not set? CLI?

Could be lots of reasons really, CLI being one of them, but some people prefer to suppress that info as well...

Note: See TracTickets for help on using tickets.