-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
This is:
- a bug report
- a feature request
- not a usage question (ask them on https://stackoverflow.com/questions/tagged/phpword)
Expected Behavior
Library should allow creating Footnote within ListItemRun.
Current Behavior
BadMethodCallException is being thrown from PhpOffice\PhpWord\Element\AbstractContainer
How to Reproduce
<?php
require __DIR__ . '/vendor/autoload.php';
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$liRun = $section->addListItemRun(0, ['listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER]);
$liRun->addText('foo');
$fn = $liRun->addFootnote();
$fn->addText($footnote);I've tried to comment the thrown exception. Generated word is valid and displaying correctly. This is solely to revise allowed containers for footnote container.
Thank you.
Context
- PHP version: 7.1
- PHPWord version: 0.14
Metadata
Metadata
Assignees
Labels
No labels