- What language is this for?
PHP - Which rule?
php:S4792 - Why do you believe it’s a false-positive/false-negative?
Code follows best practices according to reference material cited. - SonarQube - v9.9.6
- Recreate using this code excerpt:
// report all errors and notices but don't display any
error_reporting(E_ALL);
ini_set('display_errors', '0');
Rule examples provided state the exceptions for production servers which are valid are:
ini_set(‘display_errors’, ‘0’);
error_reporting(0);
Link to recommended settings references: PHP Logging Basics - The Ultimate Guide To Logging
Table of recommended configuration settings specifies:
display_errors: 0
error_reporting: E_ALL