From 7ed1026519d2203af240454365c14e1396e3b935 Mon Sep 17 00:00:00 2001 From: Steven Wichers Date: Mon, 7 Nov 2016 17:24:16 -0700 Subject: [PATCH] Resolve mailsystem warnings. --- mailsystem.theme.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mailsystem.theme.inc b/mailsystem.theme.inc index ca6cda1..aed7946 100644 --- a/mailsystem.theme.inc +++ b/mailsystem.theme.inc @@ -47,9 +47,17 @@ function mailsystem_theme_theme_registry_alter(&$theme_registry) { // Include template files to let _theme_load_registry add preprocess // functions. foreach ($base_theme as $base) { - include_once drupal_get_path('theme', $base->name) . '/template.php'; + $templatepath = drupal_get_path('theme', $base->name) . '/template.php'; + if (is_readable($templatepath)) { + + include_once $templatepath; + } + } + $templatepath = drupal_get_path('theme', $theme->name) . '/template.php'; + if (is_readable($templatepath)) { + + include_once $templatepath; } - include_once drupal_get_path('theme', $theme->name) . '/template.php'; // Get the theme_registry cache. $cache = _theme_load_registry($theme, $base_theme, $theme_engine); -- 2.10.1