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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

srclarkx created an issue. See original summary.

srclarkx’s picture

srclarkx’s picture

Status: Active » Needs review

The patch needs review.

mikeytown2’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, will commit soon.

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

#2 has been committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.