diff --git a/core/lib/Drupal/Core/Schema/Schema.php b/core/lib/Drupal/Core/Schema/Schema.php index 2dc674b..b0ee5e0 100644 --- a/core/lib/Drupal/Core/Schema/Schema.php +++ b/core/lib/Drupal/Core/Schema/Schema.php @@ -144,9 +144,8 @@ public function getComplete($rebuild = FALSE) { if ($rebuild) { $this->cacheBackend->deleteTags(array('schema' => TRUE)); } - // If the schema is empty, avoid saving it: some database engines require - // the schema to perform queries, and this could lead to infinite loops. - if (!empty($this->completeSchema) && ($this->drupalGetBootstrapPhase() == DRUPAL_BOOTSTRAP_FULL)) { + // If the schema is empty, avoid saving it. + if (!empty($this->completeSchema) && $this->isFullDrupalBootstrapPhase()) { $this->cacheBackend->set('schema', $this->completeSchema, Cache::PERMANENT, array('schema' => TRUE)); } } @@ -341,10 +340,12 @@ protected function initialize(&$schema, $module, $remove_descriptions = TRUE) { } /** - * Wraps drupal_get_bootstrap_phase(). + * Determines if the drupal bootstrap phase is full. + * + * @return bool */ - protected function drupalGetBootstrapPhase() { - return drupal_get_bootstrap_phase(); + protected function isFullDrupalBootstrapPhase() { + return drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL; } }