diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index fb39bd4..c44bf92 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -863,8 +863,8 @@ public static function bootEnvironment() { protected function initializeSettings(Request $request) { $site_path = static::findSitePath($request); $this->setSitePath($site_path); - $class_loader_class = get_class($class_loader); - Settings::initialize($this->root, $site_path, $class_loader); + $class_loader_class = get_class($this->classLoader); + Settings::initialize($this->root, $site_path, $this->classLoader); // Initialize our list of trusted HTTP Host headers to protect against // header attacks. @@ -877,15 +877,15 @@ protected function initializeSettings(Request $request) { // If the class loader is still the same, possibly upgrade to the APC class // loader. - if ($class_loader_class == get_class($class_loader) + if ($class_loader_class == get_class($this->classLoader) && Settings::get('class_loader_auto_detect', TRUE) && Settings::get('hash_salt', FALSE) && function_exists('apc_fetch')) { $prefix = 'drupal.' . hash('sha256', 'drupal.' . Settings::getHashSalt()); - $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader); - $class_loader->unregister(); + $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $this->classLoader); + $this->classLoader->unregister(); $apc_loader->register(); - $class_loader = $apc_loader; + $this->classLoader = $apc_loader; } }