diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 3b156a5..56e1ae4 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1274,7 +1274,8 @@ function template_preprocess_html(&$variables) { } else { $system_path = \Drupal::service('path.current')->getPath(); - $variables['root_path'] = explode('/', $system_path)[1]; + debug($system_path); + $variables['root_path'] = $system_path === '/' ? '' : explode('/', $system_path)[1]; } $site_config = \Drupal::config('system.site'); diff --git a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php index 7f2dc0c..ac63e9b 100644 --- a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php @@ -633,10 +633,10 @@ protected function prepareLink(array $link, $intersect = FALSE) { $link[$name] = unserialize($link[$name]); } } - if (isset($link['title_serialized'])) { + if (array_key_exists('title_serialized', $link)) { $link['title'] = $link['title_serialized']; } - if (isset($link['description_serialized'])) { + if (array_key_exists('description_serialized', $link)) { $link['description'] = $link['description_serialized']; } diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestBaseTest.php b/core/modules/system/src/Tests/Update/UpdatePathTestBaseTest.php index 305ab78..40430fc 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestBaseTest.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestBaseTest.php @@ -37,6 +37,8 @@ public function testDatabaseLoaded() { $this->assertEqual(drupal_get_installed_schema_version($module), 8000, SafeMarkup::format('Module @module schema is 8000', ['@module' => $module])); } $this->assertEqual(\Drupal::config('system.site')->get('name'), 'Site-Install'); + + $this->runUpdates(); $this->drupalGet(''); $this->assertText('Site-Install'); }