mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed issue with BaseCsrfVerifier matching urls against urls with parameters.
- Added optional $includeParams parameter to Url::getRelativeUrl method.
This commit is contained in:
@@ -427,10 +427,15 @@ class Url implements JsonSerializable
|
||||
/**
|
||||
* Returns the relative url
|
||||
*
|
||||
* @param bool $includeParams
|
||||
* @return string
|
||||
*/
|
||||
public function getRelativeUrl(): string
|
||||
public function getRelativeUrl($includeParams = true): string
|
||||
{
|
||||
if($includeParams === false) {
|
||||
return rtrim($this->path, '/');
|
||||
}
|
||||
|
||||
$params = $this->getQueryString();
|
||||
|
||||
$path = $this->path ?? '';
|
||||
|
||||
Reference in New Issue
Block a user