Only load protocol if not speified

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-03-11 22:39:52 +01:00
commit afe2b5753e
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -60,7 +60,10 @@ class WrapperHandler {
$class = static::class;
}
$protocol = self::getProtocol($class);
if ($protocol === null) {
$protocol = self::getProtocol($class);
}
$context = self::buildContext($protocol, $context, $source);
try {
stream_wrapper_register($protocol, $class);
@ -106,4 +109,4 @@ class WrapperHandler {
}
return $context;
}
}
}