From: Matthias Schmidt Date: Wed, 6 Aug 2014 16:40:15 +0000 (+0200) Subject: Fix handling of "0" as an url part X-Git-Tag: 2.1.0_Alpha_1~471^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30178358dc6f10ee6d4a589d046dc1bffcbb5e25;p=GitHub%2FWoltLab%2FWCF.git Fix handling of "0" as an url part Previously, any url part with value "0" was discarded, now they will be preserved. --- diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index fc765e958c..d284fef531 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -203,7 +203,7 @@ class Route { protected function getParts($requestURL) { $urlParts = preg_split('~(\/|\-|\_|\.)~', $requestURL); foreach ($urlParts as $index => $part) { - if (empty($part)) { + if (!mb_strlen($part)) { unset($urlParts[$index]); } }