#12395 closed defect (bug) (fixed)
WP should also catch E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR
Reported by: | Denis-de-Bernardy | Owned by: | westi |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.2 |
Component: | Warnings/Notices | Keywords: | has-patch |
Focuses: | Cc: |
Description
When writing PHP 5 code, and using the static operator, you can end up with a blank screen in WP. Inheriting a class with a static function and overriding it with a non-static function, for instance, triggers an E_COMPILE or E_CORE (not sure which one exactly), and this leads to a blank screen unless WP_DEBUG is switched on.
The attached patch (it's against 2.9.2, but I take it that it'll apply fine to trunk) adds E_CORE and E_COMPILE to the errors reported by WP.
It also fixes an E_NOTICE when COOKIEHASH is already defined.
Attachments (3)
Change History (13)
#4
follow-up:
↓ 5
@
15 years ago
- Milestone changed from 3.0 to 2.9.3
- Resolution fixed deleted
- Status changed from closed to reopened
Suggesting backport to 2.9 branch.
#6
@
15 years ago
- Keywords has-patch added; needs-patch removed
It's not a security hole, but since there are fatal errors we're declining to report, we can cause annoying white screens of death.
This includes blank iframes when showing a fatal compile error generated by a plugin. This was seen on wp-hackers when a plugin used a function name that was already being used elsewhere. We made another change in [13167] that prevents the error scrape from overriding WP_DEBUG, which would otherwise have shown the compile error.
#7
@
15 years ago
- Cc eddie@… added
Backported to 2.9 in my patch. Haven't been following all the 3.0 changes, but I'm assuming that the error reporting levels that are set in wp-includes/load.php (which is in 3.0 but not 2.9) were moved from wp-settings.php.
broken patch. wp-settings.php & plugins.php do not apply.