From c7b4b1dcdde1cf38e56aa1141415f8604e6dacb4 Mon Sep 17 00:00:00 2001 From: g41797 Date: Wed, 3 Jan 2024 09:54:59 +0200 Subject: [PATCH] Get rid of deprecation warnings for trim() [PHP8.3] (#20090) --- framework/web/UrlManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/UrlManager.php b/framework/web/UrlManager.php index 292c4bc3e70..71c38f85d49 100644 --- a/framework/web/UrlManager.php +++ b/framework/web/UrlManager.php @@ -413,7 +413,7 @@ public function createUrl($params) $anchor = isset($params['#']) ? '#' . $params['#'] : ''; unset($params['#'], $params[$this->routeParam]); - $route = trim($params[0], '/'); + $route = trim(isset($params[0]) ? $params[0] : '', '/'); unset($params[0]); $baseUrl = $this->showScriptName || !$this->enablePrettyUrl ? $this->getScriptUrl() : $this->getBaseUrl();