diff --git a/CHANGELOG.md b/CHANGELOG.md index 6454efcb..5032d8e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Parable PHP Framework Changelog +### 0.12.12 + +__Bugfixes__ +- Bug in `\Parable\\Routing\Route::isPartCountSame($url)`, where trailing slash vs no trailing slash would be considered not the same. Fixed in PR #25 by @jerry1970. + ### 0.12.11 __Bugfixes__ diff --git a/src/Framework/App.php b/src/Framework/App.php index 6e8c4ef8..9d58d553 100644 --- a/src/Framework/App.php +++ b/src/Framework/App.php @@ -49,7 +49,7 @@ class App protected $database; /** @var string */ - protected $version = '0.12.11'; + protected $version = '0.12.12'; public function __construct( \Parable\Filesystem\Path $path, diff --git a/src/Routing/Route.php b/src/Routing/Route.php index b5f74602..0c092351 100644 --- a/src/Routing/Route.php +++ b/src/Routing/Route.php @@ -229,7 +229,7 @@ public function isAcceptedRequestMethod() */ public function isPartCountSame($url) { - return count(explode('/', $url)) === count(explode('/', $this->url)); + return count(explode('/', rtrim($url, '/'))) === count(explode('/', rtrim($this->url, '/'))); } /**