Development

#2890: sfPropelActAsTaggableToolkit.class.php.patch

You must first sign up to be able to contribute.

Ticket #2890: sfPropelActAsTaggableToolkit.class.php.patch

File sfPropelActAsTaggableToolkit.class.php.patch, 0.7 kB (added by forkmantis, 1 year ago)

Replacement patch attempting to address issue raised by Markus.Staab

  • lib/sfPropelActAsTaggableToolkit.class.php

    old new  
    3232   */ 
    3333  public static function explodeTagString($tag) 
    3434  { 
    35     if (is_string($tag) && false !== strpos($tag, ',')) 
     35    if (is_string($tag) && (false !== strpos($tag, ',') || preg_match('/\r/', $tag))) 
    3636    { 
     37      $tag = preg_replace('/\r\n|\r/', ',', $tag); 
    3738      $tag = explode(',', $tag); 
    3839      $tag = array_map('trim', $tag); 
    3940      $tag = array_map('rtrim', $tag); 
     41      $tag = array_filter($tag); 
    4042    } 
    4143 
    4244    return $tag;