我正在开发 Drupal 8 网站。该网站正在运行。我最近搬到了另一台机器。
它显示错误,例如:
Recoverable fatal error: Argument 1 passed to
Drupal\Component\DependencyInjection\Container::__construct() must be of
the type array, boolean given, called in [DRUPAL-
PATH]/core/lib/Drupal/Core/DrupalKernel.php on line 883 and defined in
[DRUPAL-PATH]/core/lib/Drupal/Component/DependencyInjection/Container.php
on line 119 #0 [DRUPAL-PATH]/core/includes/bootstrap.inc(550):
_drupal_error_handler_real(4096, 'Argument 1 pass...',
'/Applications/M...', 119, Array)
我需要以编程方式清除缓存。
最佳答案
尝试以下。
cache_clear_all() // For Drupal-7
drupal_flush_all_caches() // For Drupal-8
关于caching - 如何在 Drupal 8 中以编程方式清除缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43608217/