diff --git a/core/lib/Drupal/Component/Discovery/YamlDiscovery.php b/core/lib/Drupal/Component/Discovery/YamlDiscovery.php index 4d00f44..1d147fd 100644 --- a/core/lib/Drupal/Component/Discovery/YamlDiscovery.php +++ b/core/lib/Drupal/Component/Discovery/YamlDiscovery.php @@ -50,7 +50,7 @@ public function findAll() { foreach ($this->findFiles() as $provider => $file) { // If a file is empty or its contents are commented out, return an empty // array instead of NULL for type consistency. - $all[$provider] = Yaml::decode(file_get_contents($file)) ?: array(); + $all[$provider] = Yaml::decode(file_get_contents($file)) ?: []; } return $all;