-
Notifications
You must be signed in to change notification settings - Fork 56
Description
This simple code
$odf = new Odf('./test.odt');
for($i=0;$i<2;$i++){
$index = $odf->setSegment('index');
$iter=$index->getIterator();
foreach($iter as $s){
print_r($s->getName());
echo "\n";
}
}
throw a fatal error
Fatal error: Uncaught exception 'SegmentException' with message 'child children does not exist' in
cybermonde\odtphp\library\Segment.php:198
Stack trace:
#0 vendor\cybermonde\odtphp\library\SegmentIterator.php(36): Segment->__get('children')
#1 test.php(7): SegmentIterator->getChildren()
#2 {main} thrown in vendor\cybermonde\odtphp\library\Segment.php on line 198
In original odtphp.com version SegmentIterator@36 was return new self($this->current()->getChildrens()); not return new self($this->current()->children);
With the original code there are no fatal errors
test.odt:
[!-- BEGIN index --][!-- BEGIN c1 --][!-- END c1 --][!-- BEGIN c2 --][!-- END c2 --][!-- END index --]