Skip to content

Commit c7b4b1d

Browse files
authored
Get rid of deprecation warnings for trim() [PHP8.3] (yiisoft#20090)
1 parent dffb4c7 commit c7b4b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

framework/web/UrlManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public function createUrl($params)
413413
$anchor = isset($params['#']) ? '#' . $params['#'] : '';
414414
unset($params['#'], $params[$this->routeParam]);
415415

416-
$route = trim($params[0], '/');
416+
$route = trim(isset($params[0]) ? $params[0] : '', '/');
417417
unset($params[0]);
418418

419419
$baseUrl = $this->showScriptName || !$this->enablePrettyUrl ? $this->getScriptUrl() : $this->getBaseUrl();

0 commit comments

Comments
 (0)