phpword 1.40 Deprecated: Using null as an array offset is deprecated, use an empty string instead in style.php [closed]

19 hours ago 1
ARTICLE AD BOX

I am upgrading to php 8.50 and phpword 1.40 causing an error:

Deprecated: Using null as an array offset is deprecated, use an empty string instead in ....\vendor\phpoffice\phpword\src\PhpWord\Style.php on line 181

Kilvroch's user avatar

3

There's a bug report opened as of March 7th. Since it's in the vendor folder, it's not recommended that you fix it yourself, since any changes will be overwritten the next time you update the package.

2026-05-11 18:16:09 +00:00

Commented 13 hours ago

How do you want us to answer it? We cannot give you any answer here. This is not a question that belongs on Stack Overflow. If you have found a bug in one of the libraries you are using, report the issue to the maintainers. Then wait for the updated version to be released.

2026-05-11 19:39:19 +00:00

Commented 12 hours ago

That's not even an error, it's a deprecation notice. It's warning you that something will break in a future update if the codebase isn't modified. The code likely still works for now. If you don't want such notices popping up, configure PHP to log them to a file instead.

2026-05-11 20:37:47 +00:00

Commented 11 hours ago

Read Entire Article