Re: Bug #10702: levenshtein doesn't handle odd arguments well
| From: | Hartmut Holzgraefe | Date: | Mon, 07 May 2001 09:28:16 +0000 |
| Subject: | Re: Bug #10702: levenshtein doesn't handle odd arguments well | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-54194@lists.php.net to get a copy of this message | ||
zak@php.net wrote:
>
> From: zak@php.net
> Operating system: Win2k
> PHP version: 4.0.5
> PHP Bug Type: *Function Specific
> Bug description: levenshtein doesn't handle odd arguments well
>
> Hello Hartmut,
>
> levenshtein ('foot','fot','0','0','1');
> - and -
> levenshtein ('foot','fot','0','1','1');
>
> return the following error:
>
> Warning: levenshtein(): argument string(s) too long in f:/xitami/pub/php_er/mysql/test.php on
> line 3
<?
echo levenshtein
('foot','fot','0','0','1')."<br>\n";
echo levenshtein
('foot','fot','0','1','1')."<br>\n";
echo levenshtein
('foot','fot','1','1','0')."<br>\n";
echo levenshtein
('foot','fot','1','0','0')."<br>\n";
echo levenshtein
('foot','fot','0','0','0')."<br>\n";
?>
gives
1
1
0
0
0
for me (php-4.0.5 on a linux box)
i know that it isn't checking for negative weights which would produce
the message mentioned above, but zeros shouldn't break anything ... ?
--
Hartmut Holzgraefe hartmut@six.de http://www.six.de
+49-711-99091-77