You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the isConfusable method with the input string www.microsоft.com and a preferredAliases of ['latin']. The following error is returned: Undefined Index: Confusable.php:146.
This is because the input string contains the zero-width character \u65279 - incidentally this zero width character gets correctly parsed as the common alias however on line 146 of Confusable.php it's essentially a empty string and the array key lookup fails on the index not existing.
If the index does exist in the json source, then maybe it needs converting so the index is the escaped unicode in ASCII string form - if so this can be folded into #1.
The text was updated successfully, but these errors were encountered:
Looks as though the port was 100%; the Python source uses the dictionary get method on the loaded json source which returns a sane default.
By wrapping the assignment of $found on line 146 (now 148 after comments) with an isset check and assigning an empty array by default this issue is fixed.
When using the
isConfusable
method with the input stringwww.microsоft.com
and apreferredAliases
of['latin']
. The following error is returned:Undefined Index: Confusable.php:146
.This is because the input string contains the zero-width character
\u65279
- incidentally this zero width character gets correctly parsed as the common alias however on line 146 ofConfusable.php
it's essentially a empty string and the array key lookup fails on the index not existing.If the index does exist in the json source, then maybe it needs converting so the index is the escaped unicode in ASCII string form - if so this can be folded into #1.
The text was updated successfully, but these errors were encountered: