Skip to content

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

Description

@stefanofornari

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()
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions