Page MenuHomePhabricator

Searching for numeric strings results in an Warning.
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

use AhoCorasick\MultiStringMatcher;

$keywords = new MultiStringMatcher( array( '999' ) );

$keywords->searchIn( 'abcdef 999' );

What happens?:
The code throws a warning and an empty array is returned:

PHP Warning:  Trying to access array offset on value of type int

What should have happened instead?:

An array with the found string should have been returned with no warnings.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

This happens using the current master branch of AhoCorasick.