From 8a9a8553e5d1fcd8afc357d60cdf0eb76cd1686c Mon Sep 17 00:00:00 2001 From: h00j Date: Sat, 13 Feb 2021 19:28:22 +0100 Subject: [PATCH] remove named parameters from call_user_func_array calls --- mod.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod.php b/mod.php index 45cbaba1..3b2e16f0 100644 --- a/mod.php +++ b/mod.php @@ -179,7 +179,12 @@ foreach ($pages as $uri => $handler) { ); $debug['time']['parse_mod_req'] = '~' . round((microtime(true) - $parse_start_time) * 1000, 2) . 'ms'; } - + + if (is_array($matches)) { + // we don't want to call named parameters (PHP 8) + $matches = array_values($matches); + } + if (is_string($handler)) { if ($handler[0] == ':') { header('Location: ' . substr($handler, 1), true, $config['redirect_http']);