diff --git a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php index a9ce9625..98db5032 100644 --- a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php @@ -58,6 +58,9 @@ public static function create(ContainerInterface $container, $base_plugin_id) { * {@inheritdoc} */ public function fileScanDirectory($directory) { + if (!is_dir($directory)) { + return []; + } $options = ['nomask' => $this->getNoMask()]; $extensions = $this->getFileExtensions(); $extensions = array_map('preg_quote', $extensions);