diff --git a/core/modules/color/color.module b/core/modules/color/color.module index ca0dc3a..698dbfe 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -399,7 +399,7 @@ function color_scheme_form_submit($form, FormStateInterface $form_state) { // Make sure enough memory is available. if (isset($info['base_image'])) { // Fetch source image dimensions. - $source = drupal_get_path('theme', $theme) . '/' . $info['base_image']; + $source = "theme://$theme/{$info['base_image']}"; list($width, $height) = getimagesize($source); // We need at least a copy of the source and a target buffer of the same diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index ebd1f61..4eae7ae 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -260,7 +260,7 @@ function testClassLoading() { */ public function testFindThemeTemplates() { $registry = $this->container->get('theme.registry')->get(); - $templates = drupal_find_theme_templates($registry, '.html.twig', 'theme://test_theme'); + $templates = drupal_find_theme_templates($registry, '.html.twig', drupal_get_path('theme', 'test_theme')); $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.tpl.twig was found in test_theme.'); }