Skip to content

Commit

Permalink
Fix download error handler for PHP 8
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ecartz committed Nov 16, 2022
1 parent 2390c6b commit 78c7942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion download.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit 78c7942

Please sign in to comment.