Skip to content

ModulesInfo::includeModuleFile() Deprecation warning #1996

@kixe

Description

@kixe

Short description of the issue

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

https://github.com/processwire/processwire/blob/fb641fae897f8b7a4852c71b913258c3f6458fd2/wire/core/ModulesFiles.php#L312

Suggestion for a possible fix

ModulesInfo::getModuleNamespace() should always return a string (empty string instead of null)
OR
the result should be type casted to string if used as 1st argument in trim().

Setup/Environment

  • ProcessWire version: any
  • PHP version: 8.3
  • MySQL version: MariaDB 10.11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions