Skip to content

Commit 2f2a1fa

Browse files
authored
Merge pull request #18 from Vectorface/fix-empty-needle
Fix for empty base path causing warnings
2 parents 6010582 + 257fe2a commit 2f2a1fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Vectorface/SnappyRouter/Handler/ControllerHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function setEncoder(EncoderInterface $encoder)
158158
*/
159159
protected function extractPathFromBasePath($path, $options)
160160
{
161-
if (isset($options[self::KEY_BASE_PATH])) {
161+
if (!empty($options[self::KEY_BASE_PATH])) {
162162
$pos = strpos($path, $options[self::KEY_BASE_PATH]);
163163
if (false !== $pos) {
164164
$path = substr($path, $pos + strlen($options[self::KEY_BASE_PATH]));

0 commit comments

Comments
 (0)