The code for `AND` and `OR` assumes the call to splice will always
return 2 elements, which isn't the case if no terms are found.
Example log messages:
PHP Warning: Undefined array key 0 in .../dokuwiki/inc/fulltext.php on line 134
PHP Warning: Undefined array key 1 in .../dokuwiki/inc/fulltext.php on line 134
PHP Warning: foreach() argument must be of type array|object, null given in .../dokuwiki/inc/fulltext.php on line 614
Simplified example, via `php -a`:
php > $arr = [];
php > [$a, $b] = array_splice($arr, -2);
PHP Warning: Undefined array key 0 in php shell code on line 1
PHP Warning: Undefined array key 1 in php shell code on line 1
To clear the warning we check if the result is empty and break early,
otherwise we pass the result into `ft_resultCombine` or
`ft_resultUnite`, which both handle the length 1 arrays.
This replaces the abandoned fork with my own fork at splitbrain/lesserphp
That fork has been cleaned up somewhat and the issues in #4088 should be
fixed.
There was a global statement missing? This seems to have to been
broken in one of the recent merges.
Tests have been cleaned up but not changes in logic.
It seems that the dataProvider generator runs before the rest of the
test suite, resulting in a wrong modification timestamp being read.
It's unclear why this happens on Github only.
This breaks up the humongous functions from feed.php into multiple
classes. To keep compatibility with existing Plugin events, the basic
principle of how the feed is assembled has not been changed:
* depending on the given mode and other options lose arrays of items are
gathered
* these items are then converted (again based on the various options)
into proper FeedItems
* the FeedItems are then added to the Feed
The conversion from loosely typed item data to something more structured
is now done by the FeedItemProcessor classes. Some very basic tests have
been added. It does not cover erverything but covers more than before
(which was nothing).
Manual testing before merging this is highly recommended. I am not
confident that I ported over everything correctly.
No new features have been added, but especially media support could and
should be improved in the future.
When a basedir could not be detected, the default previously was '.'
resulting in a valid but weird URL (http://example.com/./doku.php). We
now default to an empty dir, resulting in a more sensible URL of
http://example.com/doku.php
This should not matter in real web server setups but will be in effect
while testing.