Skip to content

Commit

Permalink
fix issue slugify method
Browse files Browse the repository at this point in the history
In case a user insert a text with special characters in a page the method slugify would break without this change.
Specifically I get the error " iconv: Detected an illegal character in input string ".
Adding the @ silent this notice and all works fine.
  • Loading branch information
samuele-mrapps committed Mar 12, 2015
1 parent bdbec59 commit 5ee7552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kunstmaan/UtilitiesBundle/Helper/Slugifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static function slugify($text, $default = 'n-a', $replace = array("'"), $
$slugifier = new Slugifier();
$text = $slugifier->rus2translit($text);

$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
$text = @iconv('utf-8', 'us-ascii//TRANSLIT', $text);
setlocale(LC_CTYPE, $previouslocale);
}

Expand Down

0 comments on commit 5ee7552

Please sign in to comment.