Skip to content
Closed
Changes from 1 commit
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
Next Next commit
Update AbstractStyle.php
Provide more information when style import fails.
  • Loading branch information
h6w committed Nov 19, 2014
commit 671b683acc500195bce0d6fc26f77664a65c30c9
2 changes: 1 addition & 1 deletion src/PhpWord/Style/AbstractStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,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.');
throw new \InvalidArgumentException('Invalid style value:'.$value.' Options:'.join(',',$enum));
} elseif ($value === null || trim($value) == '') {
$value = $default;
}
Expand Down