diff --git a/src/Utils/DrupalApi.php b/src/Utils/DrupalApi.php index 57a97d1a5..6ac8da514 100644 --- a/src/Utils/DrupalApi.php +++ b/src/Utils/DrupalApi.php @@ -263,7 +263,9 @@ public function drupal_rebuild($class_loader, \Symfony\Component\HttpFoundation\ $kernel->invalidateContainer(); // Prepare a NULL request. - $kernel->prepareLegacyRequest($request); + if (method_exists($kernel, 'prepareLegacyRequest')) { + $kernel->prepareLegacyRequest($request); + } foreach (Cache::getBins() as $bin) { $bin->deleteAll();