Make WordPress Core

Opened 13 years ago

Closed 12 years ago

Last modified 10 years ago

#18927 closed enhancement (wontfix)

is_email() check for string first

Reported by: jkudish's profile jkudish Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.3
Component: Formatting Keywords: has-patch close
Focuses: Cc:

Description

Currently, if you pass anything else than a string to is_email() it will generate a fatal error because strlen() expects a string. The proposed patch checks for is_string() first.

Attachments (1)

18927.diff (536 bytes) - added by jkudish 13 years ago.

Download all attachments as: .zip

Change History (6)

@jkudish
13 years ago

#1 @kurtpayne
13 years ago

  • Cc kpayne@… added

Related #17433.

#2 follow-up: @nacin
13 years ago

  • Keywords close added

Why? is_email() should only get a string. Passing it something that isn't scalar is a developer error. I'd rather the developer see a fatal error than a suppressed false.

#3 in reply to: ↑ 2 @jkudish
12 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replying to nacin:

Why? is_email() should only get a string. Passing it something that isn't scalar is a developer error. I'd rather the developer see a fatal error than a suppressed false.

fair.

#4 @helenyhou
12 years ago

  • Milestone Awaiting Review deleted

#5 @SergeyBiryukov
10 years ago

#29083 was marked as a duplicate.

Note: See TracTickets for help on using tickets.