mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
Dibi\Helpers::getSuggestion(): item may be an int, type cast fix (#378)
This commit is contained in:
@@ -143,6 +143,7 @@ class Helpers
|
||||
{
|
||||
$best = null;
|
||||
$min = (strlen($value) / 4 + 1) * 10 + .1;
|
||||
$items = array_map('strval', $items);
|
||||
foreach (array_unique($items) as $item) {
|
||||
if (($len = levenshtein($item, $value, 10, 11, 10)) > 0 && $len < $min) {
|
||||
$min = $len;
|
||||
|
Reference in New Issue
Block a user