From fc3504791c0563dfd7d6289732eed31475201ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Mal=C3=ADk?= Date: Tue, 23 May 2023 17:01:31 +0200 Subject: [PATCH] fixed "Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated" for PHP 8.2 --- phpthumb.functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpthumb.functions.php b/phpthumb.functions.php index bcad252..98615d1 100644 --- a/phpthumb.functions.php +++ b/phpthumb.functions.php @@ -706,7 +706,7 @@ public static function CleanUpURLencoding($url, $queryseperator='&') { return $url; } $parsed_url = self::ParseURLbetter($url); - $pathelements = explode('/', $parsed_url['path']); + $pathelements = explode('/', (string)$parsed_url['path']); $CleanPathElements = array(); $TranslationMatrix = array(' '=>'%20'); foreach ($pathelements as $key => $pathelement) { @@ -718,7 +718,7 @@ public static function CleanUpURLencoding($url, $queryseperator='&') { } } - $queries = explode($queryseperator, $parsed_url['query']); + $queries = explode($queryseperator, (string)$parsed_url['query']); $CleanQueries = array(); foreach ($queries as $key => $query) { @list($param, $value) = explode('=', $query);