Closed
Description
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