diff --git a/core/lib/Drupal/Component/Yaml/Yaml.php b/core/lib/Drupal/Component/Yaml/Yaml.php index ee759b2..a632416 100644 --- a/core/lib/Drupal/Component/Yaml/Yaml.php +++ b/core/lib/Drupal/Component/Yaml/Yaml.php @@ -66,8 +66,9 @@ protected function determineImplementation() { return static::$implementationClass; } + $settings = Settings::getSingleton(); // If there's a settings.php override, use that. - if ($class = Settings::getSingleton()->get('yaml_parser_class')) { + if ($settings && ($class = $settings->get('yaml_parser_class'))) { static::$implementationClass = $class; } // If the PECL YAML extension installed, use that.