nextcloud/lib/private/Log
Chih-Hsuan Yen be51d8390b
Correctly skip suppressed errors in PHP 8.0
Applies the suggested transformation mentioned in
https://www.php.net/manual/en/migration80.incompatible.php,

> The @ operator will no longer silence fatal errors (E_ERROR,
> E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR,
> E_PARSE). Error handlers that expect error_reporting to be 0 when
> @ is used, should be adjusted to use a mask check instead

The new code still works on PHP 7, as error_reporting() already
returns 0 when diagnostics are suppressed.

This fixes https://github.com/nextcloud/server/issues/25807 in PHP 8.0.
For PHP 7.x, https://github.com/nextcloud/server/pull/22243 suppresses
the E_NOTICE message from the second session_start() call with the error
suppression operator @, and thus those E_NOTICE messages are still
logged in PHP 8.0.

See also https://github.com/nextcloud/server/issues/25806

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
2021-07-14 13:14:30 +08:00
..
ErrorHandler.php Correctly skip suppressed errors in PHP 8.0 2021-07-14 13:14:30 +08:00
Errorlog.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
ExceptionSerializer.php Don't log keys on checkSignature 2021-01-18 16:09:06 +01:00
File.php Fix warning in PHP 8 about optional parameter before mandatory one 2021-01-07 12:43:56 +01:00
LogDetails.php Update license headers for 19 2020-04-29 11:57:22 +02:00
LogFactory.php Update license headers for 19 2020-04-29 11:57:22 +02:00
PsrLoggerAdapter.php Make the PSR-3 adapter exception-aware 2020-07-14 09:38:51 +02:00
Rotate.php Update license headers for 19 2020-04-29 11:57:22 +02:00
Syslog.php Update license headers 2019-12-05 15:38:45 +01:00
Systemdlog.php Update license headers for 19 2020-04-29 11:57:22 +02:00