Skip to content

Commit afe2b57

Browse files
committed
Only load protocol if not speified
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent 064d012 commit afe2b57

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/WrapperHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ protected static function wrapSource($source, $context = [], $protocol = null, $
6060
$class = static::class;
6161
}
6262

63-
$protocol = self::getProtocol($class);
63+
if ($protocol === null) {
64+
$protocol = self::getProtocol($class);
65+
}
66+
6467
$context = self::buildContext($protocol, $context, $source);
6568
try {
6669
stream_wrapper_register($protocol, $class);
@@ -106,4 +109,4 @@ protected function loadContext($name = null) {
106109
}
107110
return $context;
108111
}
109-
}
112+
}

0 commit comments

Comments
 (0)