You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request isn't a duplicate of an existing issue
I've read the docs and followed them (if applicable)
This is not a personal support request that should be posted on the Roots Discourse community
Description
Note: acorn put the code of a previously deprecated package (on packagist) into its own repo.
There is a bug with the bitwise operation used in the condition to check for error_reporting as it doesn't work for disabled error_reporting or error_reporting without lower reporting levels:
with error_reporting set to 0 or E_ERROR | E_WARNING | E_PARSE in order to skip E_NOTICE PHP errors,
the error will still be thrown, shown and destroy the page markup at that point with injected "rich" error HTML.
Steps to reproduce
Configure for lower or none error_reporting, e.g. for staging in config/environments/staging.php
Trigger a PHP E_NOTICE message, e.g. an Undefined index error by accessing an undefined index of a PHP array:
Note that these lower level PHP errors still cause a "rich" HTML error message, which shouldn't happen.
Expected behavior:
PHP errors with levels to be ignored.
Actual behavior:
PHP errors with levels to be ignored are still thrown.
Reproduces how often:
Always.
Versions
Bedrock:
### 1.15.3: 2021-03-12
* chore(deps): Bump roots/wordpress from 5.6.2 to 5.7 ([#578](https://github.com/roots/bedrock/pull/578))
Description
Note:
acorn
put the code of a previously deprecated package (on packagist) into its own repo.There is a bug with the bitwise operation used in the condition to check for
error_reporting
as it doesn't work for disabled error_reporting orerror_reporting
without lower reporting levels:acorn/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
Line 68 in a2ef0a5
with
error_reporting
set to0
orE_ERROR | E_WARNING | E_PARSE
in order to skipE_NOTICE
PHP errors,the error will still be thrown, shown and destroy the page markup at that point with injected "rich" error HTML.
Steps to reproduce
error_reporting
, e.g. for staging inconfig/environments/staging.php
E_NOTICE
message, e.g. anUndefined index
error by accessing an undefined index of a PHP array:Note that these lower level PHP errors still cause a "rich" HTML error message, which shouldn't happen.
Expected behavior:
PHP errors with levels to be ignored.
Actual behavior:
PHP errors with levels to be ignored are still thrown.
Reproduces how often:
Always.
Versions
Bedrock:
Additional information
Related: #87
The text was updated successfully, but these errors were encountered: