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; $class = static::class;
} }
$protocol = self::getProtocol($class); if ($protocol === null) {
$protocol = self::getProtocol($class);
}
$context = self::buildContext($protocol, $context, $source); $context = self::buildContext($protocol, $context, $source);
try { try {
stream_wrapper_register($protocol, $class); stream_wrapper_register($protocol, $class);