1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 01:35:02 +00:00

Fix crash when using the search bar in recent versions of php

This commit is contained in:
Starbeamrainbowlabs 2021-07-20 23:54:56 +01:00
parent 440b4e9cda
commit 86206195b6
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
- Improved error handling on first run where the PHP Zip extension is not installed
- Also extract to `._extra_data` if the directory is empty
- Add `sidebar_show` to the settings GUI and the [configuration guide](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php)
- Fix crash when using the search bar with PHP 8.0+
## v0.22

View file

@ -533,7 +533,7 @@ class search
* Example I used when writing this: https://www.php.net/manual/en/function.strtok.php#94463
* @param string $query The query string to split.
*/
public function stas_split($query) {
public static function stas_split($query) {
$query = self::$literator->transliterate($query);
$terms = [];
@ -561,7 +561,7 @@ class search
* @param string[] $tokens The array of query tokens to parse.
*/
public function stas_parse($tokens) {
public static function stas_parse($tokens) {
global $settings;
/* Supported Syntax *