Explorar o código

[Sluggable] urlizer issue with unrecognised utf8 character

Gediminas Morkevicius %!s(int64=14) %!d(string=hai) anos
pai
achega
4d559821d7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Gedmo/Sluggable/Util/Urlizer.php

+ 1 - 1
lib/Gedmo/Sluggable/Util/Urlizer.php

@@ -301,7 +301,7 @@ class Urlizer
             }
 
             $newchar = $ord & 255;            
-            if (array_key_exists($newchar, $UTF8_TO_ASCII[$bank])) {
+            if (isset($UTF8_TO_ASCII[$bank]) && array_key_exists($newchar, $UTF8_TO_ASCII[$bank])) {
                 echo $UTF8_TO_ASCII[$bank][$newchar];
             } else {
                 echo $unknown;