Skip to content

3.0.194 found 2 PHP-8 deprecation warnings #1531

Closed
@horst-n

Description

@horst-n

Short description of the issue

I used PW 3.0.194 against PHP 8.1.12 and got two deprecation warnings

a) Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ... wire-3.0.194\core\PagesPathFinder.php on line 1928

b) Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ... wire-3.0.194\modules\LanguageSupport\LanguageSupportPageNames.module on line 515

Optional: Suggestion for a possible fix

I could fix these with

a) 1928: if(is_null($segment) || !strlen($segment)) continue;

b) 515: if($name == Pages::defaultRootName || is_null($name) || !strlen($name)) return '/';

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