We are getting an error when we run our build script because we have a theme that doesn't have a theme path. I know this isn't the usual case. We deprecated the theme, removed the theme directory and removed it from the select list of themes. We kept the theme name around because it still exists in our revision tables and removing it caused errors in our build script. I looked at the code and it appears that the theme_path is not verified before it is used, see below.
// Skip if the file that was changed is not in this themes directory.
$theme_path = drupal_get_path('theme', $theme_name);
if (strpos($css_file, $theme_path) !== 0) {
continue;
}
$files_in_theme[] = $css_file;
The conditional statement should be replaced with
if ((!empty($theme_path)) && strpos($css_file, $theme_path) !== 0)
I will add a patch.
Comment | File | Size | Author |
---|---|---|---|
#2 | advagg-theme_with_no_path-2613386-1-7.patch | 548 bytes | srclarkx |
Comments
Comment #2
srclarkx CreditAttribution: srclarkx commentedComment #3
srclarkx CreditAttribution: srclarkx commentedThe patch needs review.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedLooks good, will commit soon.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commented#2 has been committed