#24357 closed defect (bug) (fixed)
Stop suppressing E_DEPRECATED when WP_DEBUG
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Our current code in wp_debug_mode() is not designed for PHP 5.4. When WP_DEBUG is on, we set the error reporting level to E_ALL minus E_DEPRECATED and minus E_STRICT.
Given that PHP 5.4 has turned many of these E_DEPRECATED situations (such as call-time pass-by-reference) into fatal or parse errors — removing deprecated features as they promised — plugin authors need to know their code will no longer be working.
I don't think it's a bad idea to continue to suppress E_STRICT, though we can make that decision at a later time. If a developer sees too many notices, they're going to ignore all of them. For this, we'll need to do a >= 5.4 check and then lump in E_STRICT, as E_STRICT is *not* included in E_ALL prior to 5.4 (thus our current check is already a little wonky).
Also, core is pretty solid when it comes to both E_STRICT and E_DEPRECATED issues, because we've been testing with the latest versions of PHP for some time now.
Change History (6)
#2
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 24288:
#3
follow-up:
↓ 4
@
11 years ago
After updating nighty built just now, I discover this message concerning core WP
Strict Standards: Redefining already defined constructor for class WP_Widget in /Applications/MAMP/htdocs/wp_svn36/wp-includes/widgets.php on line 93
Config : I use PHP 5.4.10 on MAMP localhost with error_reporting level set to E_ALL
Best regards
M.
Or rather, let's just do E_ALL — and if the user is running 5.4, they'll see E_STRICT. If they're running less than 5.4, they won't.