From 2c69095a1edf7474073451285238659d0f62ce3f Mon Sep 17 00:00:00 2001 From: Appleman1234 Date: Sun, 25 Sep 2022 13:30:13 +1000 Subject: PHP8.1 fixes from Rector --- inc/route.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/route.php') diff --git a/inc/route.php b/inc/route.php index 2a5c1732..d056d180 100644 --- a/inc/route.php +++ b/inc/route.php @@ -8,7 +8,7 @@ defined('TINYBOARD') or exit; function route($path) { global $config; - $entrypoints = array(); + $entrypoints = []; $entrypoints['/%b/'] = 'sb_board'; $entrypoints['/%b/'.$config['file_index']] = 'sb_board'; @@ -40,7 +40,7 @@ function route($path) { global $config; $reached = false; - list($request) = explode('?', $path); + [$request] = explode('?', (string) $path); foreach ($entrypoints as $id => $fun) { $id = '@^' . preg_quote($id, '@') . '$@u'; @@ -54,7 +54,7 @@ function route($path) { global $config; if (preg_match ($id, $request, $matches)) { array_shift($matches); - $reached = array($fun, $matches); + $reached = [$fun, $matches]; break; } -- cgit v1.3