Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap
- MsDOC Reader: Basic MsDOC Reader - @Progi1984 GH-23 GH-287
- "absolute" horizontal and vertical positioning of Frame - @basjan GH-302
- Add new-page function for PDF generation. For multiple PDF-backends - @chc88 GH-426
- Report style options enumerated when style unknown - @h6w

### Bugfixes

Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Style/AbstractStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected function setFloatVal($value, $default = null)
protected function setEnumVal($value = null, $enum = array(), $default = null)
{
if ($value != null && trim($value) != '' && !empty($enum) && !in_array($value, $enum)) {
throw new \InvalidArgumentException("Invalid style value: {$value}");
throw new \InvalidArgumentException("Invalid style value: {$value} Options:".join(',', $enum));
} elseif ($value === null || trim($value) == '') {
$value = $default;
}
Expand Down