Browse Source

Fix issue with `/0` as a path.

Type juggling resulted in the `'0'` being eaten and not set as the path.
Mark Story 8 years ago
parent
commit
0fd5153658
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Http/ServerRequest.php

+ 1 - 1
src/Http/ServerRequest.php

@@ -311,7 +311,7 @@ class ServerRequest implements ArrayAccess, ServerRequestInterface
         if (strpos($config['url'], '?') !== false) {
             list($config['url'], $querystr) = explode('?', $config['url']);
         }
-        if ($config['url']) {
+        if (strlen($config['url'])) {
             $uri = $uri->withPath('/' . $config['url']);
         }
         if (strlen($querystr)) {