Fix handling of "0" as an url part
authorMatthias Schmidt <gravatronics@live.com>
Wed, 6 Aug 2014 16:40:15 +0000 (18:40 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 6 Aug 2014 16:40:15 +0000 (18:40 +0200)
Previously, any url part with value "0" was discarded, now they will be preserved.

wcfsetup/install/files/lib/system/request/Route.class.php

index fc765e958c4b1d2a745b8cc04dc31bd9d5335191..d284fef53167fe3f7d517c1876f9d92d16ffde34 100644 (file)
@@ -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]);
                        }
                }