From 78c79422784666045a1a347ecf213b49f83ced15 Mon Sep 17 00:00:00 2001 From: Matt Fletcher <104613+ecartz@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:15:29 +0000 Subject: [PATCH] Fix download error handler for PHP 8 In PHP 8, the error handler no longer gets a context array. We weren't using it anyway, so setting it to $unused and making it nullable. --- download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download.php b/download.php index 4d2374ffd..17b7b8ad3 100644 --- a/download.php +++ b/download.php @@ -12,7 +12,7 @@ // Upgrade notices, warnings, etc. to fatal errors // This prevents notices from appearing in the body of the file. - set_error_handler(function ($severity, $message, $file, $line, $context) { + set_error_handler(function ($severity, $message, $file, $line, $unused = null) { if (error_reporting() & $severity) { throw new ErrorException($message, 0, $severity, $file, $line); }