Skip to content

Commit 54eb6e6

Browse files
author
Stefan Thoolen
committed
Fix for undefined index
PHP Notice: Undefined index: document in /home/stefan/Projects/garrcomm/PHPWord/src/PhpWord/Reader/Word2007.php on line 65 PHP Warning: Invalid argument supplied for foreach() in /home/stefan/Projects/garrcomm/PHPWord/src/PhpWord/Reader/Word2007.php on line 65
1 parent 1876062 commit 54eb6e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PhpWord/Reader/Word2007.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function load($docFile)
6262
foreach ($steps as $step) {
6363
$stepPart = $step['stepPart'];
6464
$stepItems = $step['stepItems'];
65+
if (!isset($relationships[$stepPart])) {
66+
continue;
67+
}
6568
foreach ($relationships[$stepPart] as $relItem) {
6669
$relType = $relItem['type'];
6770
if (isset($stepItems[$relType])) {

0 commit comments

Comments
 (0)