diff options
Diffstat (limited to 'src/Components/OptionsArray.php')
-rw-r--r-- | src/Components/OptionsArray.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php index 6b43844..a496273 100644 --- a/src/Components/OptionsArray.php +++ b/src/Components/OptionsArray.php @@ -256,9 +256,10 @@ class OptionsArray extends Component */ public static function build($component) { - if ((empty($component)) || (!is_array($component->options))) { + if (empty($component->options)) { return ''; } + $options = array(); foreach ($component->options as $option) { if (!is_array($option)) { @@ -266,9 +267,7 @@ class OptionsArray extends Component } else { $options[] = $option['name'] . (!empty($option['equals']) ? '=' : ' ') - . (!empty($option['expr']) ? ((string) $option['expr']) : $option['value']); - // If `$option['expr']` happens to be a component, the magic - // method will build it automatically. + . (!empty($option['expr']) ? $option['expr'] : $option['value']); } } return implode(' ', $options); |