@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

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

+4 -4
+4 -4
externals/porter-stemmer/src/Porter.php
··· 402 402 { 403 403 $c = self::$regex_consonant; 404 404 405 - return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1}; 405 + return preg_match("#$c{2}$#", $str, $matches) AND $matches[0][0] == $matches[0][1]; 406 406 } 407 407 408 408 /** ··· 419 419 420 420 return preg_match("#($c$v$c)$#", $str, $matches) 421 421 AND strlen($matches[1]) == 3 422 - AND $matches[1]{2} != 'w' 423 - AND $matches[1]{2} != 'x' 424 - AND $matches[1]{2} != 'y'; 422 + AND $matches[1][2] != 'w' 423 + AND $matches[1][2] != 'x' 424 + AND $matches[1][2] != 'y'; 425 425 } 426 426 }