From f6973fd01f7ee4282c100e0d2d67115b4881b12a Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 27 Apr 2024 01:09:41 +0100 Subject: [PATCH] [core] make PageRequest->page_starts_with be less weird --- core/event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/event.php b/core/event.php index 5b545eed..814a1bee 100644 --- a/core/event.php +++ b/core/event.php @@ -167,7 +167,7 @@ class PageRequestEvent extends Event public function page_starts_with(string $name): bool { - return (count($this->args) >= 1) && ($this->args[0] == $name); + return str_starts_with($this->path, $name); } /**