diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index e763ad6..f1dd106 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -206,7 +206,7 @@ public function addTheme(Extension $theme) { if (isset($theme->info['engine'])) { $theme->engine = $theme->info['engine']; } - if (!empty($theme->info['base theme'])) { + if (isset($theme->info['base theme'])) { $theme->base_theme = $theme->info['base theme']; } $this->list[$theme->getName()] = $theme; @@ -283,6 +283,10 @@ public function rebuildThemeData() { $theme->status = (int) isset($installed[$key]); $theme->info = $this->infoParser->parse($theme->getPathname()) + $defaults; + // Handle when 'base theme: false' is set in a theme .info.yml file. + if (empty($theme->info['base theme'])) { + unset($theme->info['base theme']); + } // Add the info file modification time, so it becomes available for // contributed modules to use for ordering theme lists. diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module index 72bae26..9a34105 100644 --- a/core/modules/quickedit/quickedit.module +++ b/core/modules/quickedit/quickedit.module @@ -80,7 +80,7 @@ function quickedit_library_info_alter(&$libraries, $extension) { if (isset($theme) && $theme_path = drupal_get_path('theme', $theme)) { $info = system_get_info('theme', $theme); // Recurse to process base theme(s) first. - if (!empty($info['base theme'])) { + if (isset($info['base theme'])) { $alter_library($library, $info['base theme']); } if (isset($info['quickedit_stylesheets'])) { diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php index 9fbc41e..8f6b58a 100644 --- a/core/modules/system/src/Controller/SystemController.php +++ b/core/modules/system/src/Controller/SystemController.php @@ -247,7 +247,7 @@ public function themesPage() { $theme->incompatible_region = !isset($theme->info['regions']['content']); $theme->incompatible_php = version_compare(phpversion(), $theme->info['php']) < 0; // Confirmed that the base theme is available. - $theme->incompatible_base = !empty($theme->info['base theme']) && !isset($themes[$theme->info['base theme']]); + $theme->incompatible_base = isset($theme->info['base theme']) && !isset($themes[$theme->info['base theme']]); // Confirm that the theme engine is available. $theme->incompatible_engine = isset($theme->info['engine']) && !isset($theme->owner); }