1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 01:54:12 +02:00

Fixed a bunch of PHP 7.4 syntax errors

- FIX: Removed pointless (and invalid) destructor in LinkedIn::__destruct()
- FIX: All files that trigger this deprecation notice in PHP 7.4:
       "Array and string offset access syntax with curly braces is deprecated"
This commit is contained in:
Nick Liu
2020-01-18 18:26:35 +01:00
parent d55fe8a77b
commit 524229ba0b
9 changed files with 65 additions and 74 deletions

View File

@@ -56,16 +56,16 @@ class e_search
foreach ($this -> keywords['split'] as $k_key => $key)
{
if (!$this -> stopword($key)) {
if ($key{($tp->ustrlen($key) - 1)} == '*') {
if ($key[($tp->ustrlen($key) - 1)] == '*') {
$this -> keywords['wildcard'][$k_key] = TRUE;
$key = $tp->usubstr($key, 0, -1);
} else {
$this -> keywords['wildcard'][$k_key] = FALSE;
}
if ($key{0} == '+') {
if ($key[0] == '+') {
$this -> keywords['boolean'][$k_key] = '+';
$this -> keywords['match'][$k_key] = substr($key, 1);
} else if ($key{0} == '-') {
} else if ($key[0] == '-') {
$this -> keywords['boolean'][$k_key] = '-';
$this -> keywords['match'][$k_key] = substr($key, 1);
} else {
@@ -451,10 +451,10 @@ class e_search
{
global $search_prefs;
$tp = e107::getParser();
if ($search_prefs['mysql_sort'] && ($key{0} == '+')) {
if ($search_prefs['mysql_sort'] && ($key[0] == '+')) {
$key = $tp->usubstr($key, 1);
}
if (($key{($tp->ustrlen($key) - 1)} != '*') && ($key{0} != '+')) {
if (($key[($tp->ustrlen($key) - 1)] != '*') && ($key[0] != '+')) {
if ($tp->ustrlen($key) > 2) {
if ($search_prefs['mysql_sort']) {
$stopword_list = $this -> stopwords_mysql;