Skip to content
Advertisement

PHP 8.0.12 Error Reporting Not Showing All Errors

I’m trying to move an application to PHP 8 from PHP 7. But whenever there’s an error in my code, only the first error is displayed, even if there’s a fatal error after that first error. error_reporting is set to E_ALL, display_errors and display_startup_errors are on.

For example,

<?php
    echo $tmp;
    require_once("non-existing-file");

Only the error on the first line is displayed, the script just stops executing afterwards.

However, if I set ignore_repeated_errors to off, the error reporting works normally and all errors are displayed, but this could cause my log file to grow very large very quickly.

Does anyone know of any way to work around this? or if an explanation can be offered

PS: In the PHP7 version ignore_repeated_errors is set to on and all errors are still displayed

Advertisement

Answer

I have been able to confirm that this is a bug in php 8.0.12 and the dev team has promised to fix it in the next release.

This is a link to the bug report https://bugs.php.net/bug.php?id=81591

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement