Skip to content

Commit e9a486e

Browse files
committed
Fix "Attempt to read property "length" on array" error
1 parent d5ca5b4 commit e9a486e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Shared/XMLReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getDomFromZip($zipFile, $xmlFile)
6262

6363
$zip = new ZipArchive();
6464
$zip->open($zipFile);
65-
$content = $zip->getFromName($xmlFile);
65+
$content = $zip->getFromName(ltrim($xmlFile, '/'));
6666
$zip->close();
6767

6868
if ($content === false) {

0 commit comments

Comments
 (0)