error handler treats type hint violations as notices
|Reported by:||mrclay||Owned by:|
E_RECOVERABLE_ERROR (4096 "Catchable fatal error. It indicates that a probably dangerous error occurred...") was added in PHP5.2 and notably occurs when a type hint is violated by a runtime function call.
These should throw Exceptions, but do not because _elgg_php_error_handler's switch() does not include a case for 4096, so it passes through to be treated as a NOTICE. We can easily support PHP < 5.2 by simply including a case for 4096 instead of the named constant.
Change History (7)
comment:3 Changed 12 months ago by Steve Clay
- Resolution set to fixed
- Status changed from new to closed