Merge pull request #458 from h6w/develop
Report enumerated style options available when style unknown.
This commit is contained in:
commit
d4d498d698
@ -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
|
- MsDOC Reader: Basic MsDOC Reader - @Progi1984 GH-23 GH-287
|
||||||
- "absolute" horizontal and vertical positioning of Frame - @basjan GH-302
|
- "absolute" horizontal and vertical positioning of Frame - @basjan GH-302
|
||||||
- Add new-page function for PDF generation. For multiple PDF-backends - @chc88 GH-426
|
- Add new-page function for PDF generation. For multiple PDF-backends - @chc88 GH-426
|
||||||
|
- Report style options enumerated when style unknown - @h6w
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|||||||
@ -284,7 +284,7 @@ abstract class AbstractStyle
|
|||||||
protected function setEnumVal($value = null, $enum = array(), $default = null)
|
protected function setEnumVal($value = null, $enum = array(), $default = null)
|
||||||
{
|
{
|
||||||
if ($value != null && trim($value) != '' && !empty($enum) && !in_array($value, $enum)) {
|
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) == '') {
|
} elseif ($value === null || trim($value) == '') {
|
||||||
$value = $default;
|
$value = $default;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user