mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Update deprecated array access syntax in Porter stemmer
Summary: Fixes T13472. This library uses `$a{0}`, but this is deprecated in favor of `$a[0]`. Test Plan: Ran `bin/search index Txxx --force` on a task with "filing" in the title (this term reaches the "m" rule of the stemmer). (I'm not on new enough PHP for this to actually raise an error, but I'll follow up with the reporting user.) Maniphest Tasks: T13472 Differential Revision: https://secure.phabricator.com/D20941
This commit is contained in:
parent
767528c0ed
commit
db6b4ca480
1 changed files with 4 additions and 4 deletions
8
externals/porter-stemmer/src/Porter.php
vendored
8
externals/porter-stemmer/src/Porter.php
vendored
|
@ -402,7 +402,7 @@ class Porter
|
|||
{
|
||||
$c = self::$regex_consonant;
|
||||
|
||||
return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1};
|
||||
return preg_match("#$c{2}$#", $str, $matches) AND $matches[0][0] == $matches[0][1];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -419,8 +419,8 @@ class Porter
|
|||
|
||||
return preg_match("#($c$v$c)$#", $str, $matches)
|
||||
AND strlen($matches[1]) == 3
|
||||
AND $matches[1]{2} != 'w'
|
||||
AND $matches[1]{2} != 'x'
|
||||
AND $matches[1]{2} != 'y';
|
||||
AND $matches[1][2] != 'w'
|
||||
AND $matches[1][2] != 'x'
|
||||
AND $matches[1][2] != 'y';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue