The problem occurs on documents that initially contain more than one section (section breaks «^b»). Is it possible to remove section breaks?
This code did not solve the problem:
$phpdocx->removeWordContent(array('type'=>'break'));
$content=new WordFragment($phpdocx,'document');
$phpdocx->replaceWordContent($content,array('type'=>'break'));