Skip to content

Commit a9272a8

Browse files
committed
fix: Support Header element within Title elements
We encountered issues with a Word document where this is a valid combination.
1 parent 2e4f3cf commit a9272a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Element/AbstractContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private function checkValidity($method)
253253
'Footnote' => ['Section', 'TextRun', 'Cell', 'ListItemRun'],
254254
'Endnote' => ['Section', 'TextRun', 'Cell'],
255255
'PreserveText' => ['Section', 'Header', 'Footer', 'Cell'],
256-
'Title' => ['Section', 'Cell'],
256+
'Title' => ['Section', 'Cell', 'Header'],
257257
'TOC' => ['Section'],
258258
'PageBreak' => ['Section'],
259259
'Chart' => ['Section', 'Cell'],

0 commit comments

Comments
 (0)