Skip to content
Snippets Groups Projects
Verified Commit 22ef552a authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3478628 by oily, alexpott, catch, sheshsharma, osopolar, dunx, shane...

Issue #3478628 by oily, alexpott, catch, sheshsharma, osopolar, dunx, shane birley, joegl: Fatal error: Uncaught TypeError: Drupal\Core\Extension\ThemeHandler::addTheme()
parent 78bbe4db
No related branches found
No related tags found
9 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!10786Issue #3490579 by shalini_jha, mstrelan: Add void return to all views...,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation
Pipeline #377361 passed with warnings
Pipeline: drupal

#377370

    Pipeline: drupal

    #377367

      ...@@ -67,11 +67,18 @@ public function getDefault() { ...@@ -67,11 +67,18 @@ public function getDefault() {
      public function listInfo() { public function listInfo() {
      if (!isset($this->list)) { if (!isset($this->list)) {
      $this->list = []; $this->list = [];
      $installed_themes = $this->configFactory->get('core.extension')->get('theme'); $installed_themes = array_keys($this->configFactory->get('core.extension')->get('theme'));
      if (!empty($installed_themes)) { if (!empty($installed_themes)) {
      $list = $this->themeList->getList(); $list = $this->themeList->getList();
      foreach (array_keys($installed_themes) as $theme_name) { foreach ($installed_themes as $theme) {
      $this->addTheme($list[$theme_name]); // Do not add installed themes that cannot be found by the
      // extension.list.theme service. If a theme does go missing from the
      // file system any call to ::getTheme() will result in an exception
      // and an error being logged. Ignoring the problem here allows the
      // theme system to fix itself while updating.
      if (isset($list[$theme])) {
      $this->addTheme($list[$theme]);
      }
      } }
      } }
      } }
      ......
      ...@@ -46,7 +46,7 @@ protected function setUp(): void { ...@@ -46,7 +46,7 @@ protected function setUp(): void {
      $this->configFactory = $this->getConfigFactoryStub([ $this->configFactory = $this->getConfigFactoryStub([
      'core.extension' => [ 'core.extension' => [
      'module' => [], 'module' => [],
      'theme' => [], 'theme' => ['stark' => 'stark'],
      'disabled' => [ 'disabled' => [
      'theme' => [], 'theme' => [],
      ], ],
      ...@@ -108,6 +108,16 @@ public function testThemeLibrariesEmpty(): void { ...@@ -108,6 +108,16 @@ public function testThemeLibrariesEmpty(): void {
      } }
      } }
      /**
      * Test that a missing theme doesn't break ThemeHandler::listInfo().
      *
      * @covers ::listInfo
      */
      public function testMissingTheme(): void {
      $themes = $this->themeHandler->listInfo();
      $this->assertSame([], $themes);
      }
      } }
      /** /**
      ......
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment