From d6ea8db5ef0af262fd8823c1bebb84efa06214a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81i=C5=BAnier=20He=C5=82am=20=C5=81abej?= Date: Sat, 20 Aug 2022 18:25:52 +0200 Subject: [PATCH] remove named parameters from call_user_func_array calls (#402) --- mod.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod.php b/mod.php index 72095304..417b621a 100644 --- a/mod.php +++ b/mod.php @@ -180,7 +180,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']);