diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php index 2fe19e2..6739ecd 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php +++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php @@ -103,6 +103,6 @@ function testLogging() { $this->client->post($stats_path, array(), $post)->send(); $node_counter = statistics_get($this->node->id()); $this->assertIdentical($node_counter['totalcount'], '3'); - } + } diff --git a/core/modules/statistics/statistics.php b/core/modules/statistics/statistics.php index ed132e8..15c8eca 100644 --- a/core/modules/statistics/statistics.php +++ b/core/modules/statistics/statistics.php @@ -11,7 +11,9 @@ // Load the Drupal bootstrap. require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php'; require_once dirname(dirname(__DIR__)) . '/includes/bootstrap.inc'; -drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES); +drupal_bootstrap(DRUPAL_BOOTSTRAP_KERNEL); +require_once dirname(dirname(__DIR__)) . '/includes/cache.inc'; +require_once dirname(dirname(__DIR__)) . '/includes/database.inc'; if (\Drupal::config('statistics.settings')->get('count_content_views')) { $nid = filter_input(INPUT_POST, 'nid', FILTER_VALIDATE_INT);