Added str_replace() instead of preg_replace().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aosodoev’s picture

FileSize
675 bytes

Sorry, correct file

sdboyer’s picture

Status: Needs review » Postponed (maintainer needs more info)

Some steps to replicate, please? This is a simple enough fix, and the subject strings do not seem to merit a preg_replace() in the first place, so I'd really like to commit it. But there's absolutely _nothing_ here for me to go on, so I can't quite bring myself to pull the trigger.

aosodoev’s picture

There is preg_replace(", ", ",\n", $selector_str) at the moment. It issues warning and returns NULL, that's why I replaced it by str_replace, I think it's just a typo.

aosodoev’s picture

module_load_include('inc', 'ctools', 'includes/css');
print ctools_css_assemble(ctools_css_disassemble("a {color: white} a, b {color: black} "));

warning: preg_replace(): No ending delimiter ',' found in /home/alexey/work/vhosts/drupal.test/docs/sites/all/modules/ctools/includes/css.inc on line 217

a {
  color: white;
}

 {
  color: black;
}
sdboyer’s picture

Status: Postponed (maintainer needs more info) » Fixed

Wow, I'm kinda amazed nobody caught that before. Thanks, committed.

Status: Fixed » Closed (fixed)

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