From 401b5066915af3241fc5002e01b35e18ce0c8872 Mon Sep 17 00:00:00 2001 From: sshscp15 <92885280+sshscp15@users.noreply.github.com> Date: Thu, 1 Sep 2022 10:11:00 -0300 Subject: [PATCH] fix mod.php. check if key is there and is valid --- mod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.php b/mod.php index 417b621a..d95a7fc7 100644 --- a/mod.php +++ b/mod.php @@ -132,7 +132,7 @@ foreach ($pages as $key => $callback) { if (is_string($callback) && preg_match('/^secure /', $callback)) $key .= '(/(?P[a-f0-9]{8}))?'; $key = str_replace('\%b', '?P' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key); - $new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback; + $new_pages[(!empty($key) and $key[0] == '!') ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback; } $pages = $new_pages;