From 3a88aedce165bca361e9e681282f7bead77df500 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 18 Sep 2021 09:44:46 +0200 Subject: [PATCH] fix PHP Deprecated: stripos(): Non-string needles will be interpreted as strings in the future --- api/src/Storage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Storage.php b/api/src/Storage.php index e461391c47..6695b9b95b 100644 --- a/api/src/Storage.php +++ b/api/src/Storage.php @@ -585,9 +585,9 @@ class Storage extends Storage\Base $col = $this->table_name .'.'.array_search($col, $this->db_cols).' AS '.$col; } // Check to make sure our order by doesn't have aliases that won't work - else if (stripos($col, 'AS') !== false && $order_by) + else if (stripos($col, ' AS ') !== false && $order_by) { - list($value, $alias) = explode(' AS ', $col); + list($value, $alias) = preg_split('/ AS /i', $col); if(stripos($order_by, $alias) !== FALSE && stripos($value, $this->table_name) === FALSE) { $order_by = str_replace($alias, $value, $order_by);