Closed neildaniels closed 6 years ago
In cases where a fuseSearch is performed on pages that do not all have the specified field, an Exception of Undefined offset: -1 occurs.
fuseSearch
Undefined offset: -1
For example, assume $haystack contains Pages that do not have a foo-bar field.
$haystack
foo-bar
$results = $haystack->fuseSearch($searchQuery, [ 'keys' => ['title', 'foo-bar'], ]);
This will cause site/plugins/fuse-search/vendor/loilo/fuse/src/Bitap/matched_indices.php to have an undefined offset of -1 on line 24.
site/plugins/fuse-search/vendor/loilo/fuse/src/Bitap/matched_indices.php
That error was thrown by the library the plugin depended on. I have replaced it by another library which is simpler and finds better matches in my testings.
In cases where a
fuseSearch
is performed on pages that do not all have the specified field, an Exception ofUndefined offset: -1
occurs.For example, assume
$haystack
contains Pages that do not have afoo-bar
field.This will cause
site/plugins/fuse-search/vendor/loilo/fuse/src/Bitap/matched_indices.php
to have an undefined offset of -1 on line 24.