-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Describe the bug and add attachments
phpword 1.4.0 + PHP 8.2
\PhpOffice\PhpWord\IOFactory::load($path);
【strlen(): Passing null to parameter #1 ($string) of type string is deprecated】
Expected behavior
找到 Language.php 文件中的 validateLocale() 方法(第 235 行附近),添加对 null 值的检查
public function validateLocale($locale)
{
if ($locale === null) {
// 处理 null 值的情况,例如返回默认值或抛出异常
return $this->locale;
}
Steps to reproduce
\PhpOffice\PhpWord\IOFactory::load($path);
PHPWord version(s) where the bug happened
1.4.0
PHP version(s) where the bug happened
8.1/8.2
Priority
- I want to crowdfund the bug fix (with @algora-io) and fund a community developer.I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
KeoChien commentedon Jun 16, 2025
Progi1984 commentedon Jun 21, 2025
@KeoChien Could you send the file ?