Bug #82782
closedException with 'displayErrors' => '2'
100%
Description
Exception:
The option $TYPO3_CONF_VARS[SYS][displayErrors] is not set to "-1", "0" or "1". in /usr/local/share/typo3/typo3_src-8.7.8/typo3/sysext/core/Classes/Core/Bootstrap.php:654
The documentation says "2" is a valid value in https://docs.typo3.org/typo3cms/CoreApiReference/8.7/ApiOverview/ErrorAndExceptionHandling/Configuration/
The code looks like
switch ($displayErrorsSetting) { case -1: $ipMatchesDevelopmentSystem = GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']); $exceptionHandlerClassName = $ipMatchesDevelopmentSystem ? $debugExceptionHandlerClassName : $productionExceptionHandlerClassName; $displayErrors = $ipMatchesDevelopmentSystem ? 1 : 0; $exceptionalErrors = $ipMatchesDevelopmentSystem ? $exceptionalErrors : 0; break; case 0: $exceptionHandlerClassName = $productionExceptionHandlerClassName; $displayErrors = 0; break; case 1: $exceptionHandlerClassName = $debugExceptionHandlerClassName; $displayErrors = 1; break; default: // Throw exception if an invalid option is set. throw new \RuntimeException( 'The option $TYPO3_CONF_VARS[SYS][displayErrors] is not set to "-1", "0" or "1".', 1476046290 ); } @ini_set('display_errors', $displayErrors);
So the documentation should be adapted or the option should be realised...
Updated by Christoph Lehmann about 7 years ago
Also the documentation says display_errors is not changed when $TYPO3_CONF_VARS[SYS][displayErrors] is -1, that's wrong too
Updated by Benni Mack about 7 years ago
- Status changed from New to Needs Feedback
Nope. The option "2" was removed in favor of using "-1" - we had that too in our updated projects (where LocalConfiguration was read only or added via .env variables), so this is a one-time manual process for you to update your LocalConfiguration/AdditionalConfiguration setting.
Updated by Christoph Lehmann about 7 years ago
- Category set to Documentation
Okay, thank you. fixed it in my configuration.
I currently see no option to get a stack trace in production environments (with devIPMask and displayErrors = -1) while(!) hiding warnings and notices. Is there such a possibility?
Updated by Benni Mack almost 7 years ago
- Status changed from Needs Feedback to Closed
Sorry for the late reply.
You need to configure that the ProductionExceptionHandler is not showing ERRORS etc, which can be configured via SYS/exceptionalErrors.
Updated by Gerrit Code Review almost 7 years ago
- Status changed from Closed to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55619
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55619
Updated by Wouter Wolters almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 06fbb8cfe0e0a0842feccf8423a48462e4f3474c.
Updated by Gerrit Code Review almost 7 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55620
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55620
Updated by Wouter Wolters almost 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset eb310ba3128845cf1620b7fdd74a9d184c41daa0.