Skip to content

PHP 8.1 Depreciation messages #2264

Closed
Closed
@mbursa

Description

@mbursa

Using PHPWord 0.18.3 in am getting the following two deprecation messages from PHP 8.1:

Type: 8192
Text: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
File: php_modules/phpoffice/phpword/src/PhpWord/Style/Language.php
Line: 235
Type: 8192
Text: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
File: php_modules/phpoffice/phpword/src/PhpWord/TemplateProcessor.php
Line: 984

The input type of strlen is string and of str_replace is array|string. I believe the values passed to that function should be sanitized using ?? operator.

thanks

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