Add default value for errcontext variable in error handler function

This variable is no longer passed in PHP 8.0.

It cannot be removed however, because it would not be backwards
compatible.
This commit is contained in:
Jan Hicken 2021-01-31 11:47:41 +01:00 committed by Florian Schlichting
parent f376be164e
commit 6cdbfcf226

View File

@ -13,7 +13,7 @@ function log_setup_error($errno , $errstr , $errfile , $errline) {
error_log('DAViCal setup.php: Informational: '.$errfile.'('.$errline.'): ['.$errno.'] '.$errstr);
}
function catch_setup_errors($errno , $errstr , $errfile , $errline , $errcontext ) {
function catch_setup_errors($errno , $errstr , $errfile , $errline , $errcontext = null ) {
if ( $errno == 2 ) {
// A working installation will regularly fail to include_once() for several files as it searches for the location
log_setup_error($errno , $errstr , $errfile , $errline);