diff --git a/core/lib/Drupal/Core/File/FileSystem.php b/core/lib/Drupal/Core/File/FileSystem.php index d6f94ea..aedfdf6 100644 --- a/core/lib/Drupal/Core/File/FileSystem.php +++ b/core/lib/Drupal/Core/File/FileSystem.php @@ -301,7 +301,7 @@ public function validScheme($scheme) { if (!$scheme) { return FALSE; } - return class_exists($this->streamWrapperManager->getClass($scheme)) || in_array($scheme, stream_get_wrappers()); + return class_exists($this->streamWrapperManager->getClass($scheme)); } } diff --git a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php index 7867b91..dc9f4b6 100644 --- a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php +++ b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php @@ -115,13 +115,6 @@ public function getClass($scheme) { return $this->info[$scheme]['class']; } - // Try to find it in wrappers. - foreach ($this->wrappers as $type => $wrappers) { - if (isset($this->wrappers[$type][$scheme])) { - return $this->wrappers[$type][$scheme]['class']; - } - } - return FALSE; } @@ -161,7 +154,7 @@ protected function getWrapper($scheme, $uri) { public function addStreamWrapper($service_id, $class, $scheme) { $this->info[$scheme] = array( 'class' => $class, - 'type' => method_exists($class, 'getType') ? $class::getType() : StreamWrapperInterface::ALL, + 'type' => $class::getType(), 'service_id' => $service_id, ); }