gallery3 icon indicating copy to clipboard operation
gallery3 copied to clipboard

error: trim(): Passing null to parameter #1 ($string) of type string is deprecated #0

Open stefanofornari opened this issue 2 years ago • 0 comments

I ran into the above error with latest main (below the stack trace) showing the home page with a number of albums.

adding a cast to string in line url.php:106 seems to fix the problem_

if ($path = trim((string)parse_url($uri, PHP_URL_PATH), '/'))

stack:

2023-02-14 06:21:41 +00:00 --- error: trim(): Passing null to parameter #1 ($string) of type string is deprecated
#0 [internal function]: gallery_error_Core::error_handler()
#1 /opt/Campanile/src/main/webapp/system/helpers/url.php(106): trim()
#2 /opt/Campanile/src/main/webapp/modules/gallery/libraries/Gallery_View.php(58): url_Core::site()
#3 /opt/Campanile/src/main/webapp/themes/wind/views/album.html.php(47): Gallery_View_Core->paginator()
...

stefanofornari avatar Feb 14 '23 06:02 stefanofornari