WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7035 closed enhancement (fixed)

Error Reporting should use E_* constants and bitmasks, not numbers for clarity

Reported by: jacobsantos Owned by: pishmishy
Milestone: 2.7 Priority: lowest
Severity: trivial Version:
Component: General Keywords: wp-mail has-patch
Focuses: Cc:

Description

error_reporting(2037); in wp-mail.php on line 5.

Is not a defined constant as listed at Error Reporting php.net page.

What is this supposed to be? It should be changed to either the constant it should be or the bit mask that it evaluates to that number.

This will help future developers understand the intention of the original author in order to prevent another developer from "correcting the mistake."

Attachments (2)

7035.patch (643 bytes) - added by pishmishy 10 years ago.
7035.r8483.diff (426 bytes) - added by jacobsantos 10 years ago.
Remove error reporting from wp-mail.php based off of r8483

Download all attachments as: .zip

Change History (11)

#1 @pishmishy
10 years ago

  • Owner changed from anonymous to pishmishy
  • Status changed from new to assigned

2037 = 1 + 4 +16 +32 + 64 + 128 +256 +512 +1024

E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE

@pishmishy
10 years ago

#2 @pishmishy
10 years ago

  • Keywords has-patch added

#3 @santosj
10 years ago

This should probably go in soon.

#4 @ryan
10 years ago

Can we just get rid of that line and let the error reporting levels set in wp-settings apply?

#5 @jacobsantos
10 years ago

Yeah, that would work too.

@jacobsantos
10 years ago

Remove error reporting from wp-mail.php based off of r8483

#6 follow-up: @jacobsantos
10 years ago

Question: Was I the one that made that comment? That does sound like something I would write.

#7 in reply to: ↑ 6 @DD32
10 years ago

Replying to jacobsantos:

Question: Was I the one that made that comment? That does sound like something I would write.

You indeed did: http://trac.wordpress.org/changeset/7991#file11

#8 @jacobsantos
10 years ago

In retrospect, I was pretty much an asshole making that comment. WTF? I made this ticket!

#9 @westi
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [8488]) Remove setting of error_reporting and just use the default WordPress error_reporting settings. Fixes #7035 props jacobsantos.

Note: See TracTickets for help on using tickets.