summaryrefslogtreecommitdiffstats
path: root/src/Components/OptionsArray.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/OptionsArray.php')
-rw-r--r--src/Components/OptionsArray.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php
index 3d2fded..c048e19 100644
--- a/src/Components/OptionsArray.php
+++ b/src/Components/OptionsArray.php
@@ -242,6 +242,25 @@ class OptionsArray extends Component
}
}
+ /*
+ * We reached the end of statement without getting a value
+ * for an option for which a value was required
+ */
+ if ($state === 1
+ && $lastOption
+ && ($lastOption[1] == 'expr'
+ || $lastOption[1] == 'var'
+ || $lastOption[1] == 'var=')
+ ) {
+ $parser->error(
+ sprintf(
+ __('Value/Expression for the option %1$s was expected'),
+ $ret->options[$lastOptionId]['name']
+ ),
+ $list->tokens[$list->idx - 1]
+ );
+ }
+
if (empty($options['_UNSORTED'])) {
ksort($ret->options);
}