diff options
Diffstat (limited to 'src/Fragments/OptionsFragment.php')
-rw-r--r-- | src/Fragments/OptionsFragment.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Fragments/OptionsFragment.php b/src/Fragments/OptionsFragment.php index 1a39c6c..7b497fb 100644 --- a/src/Fragments/OptionsFragment.php +++ b/src/Fragments/OptionsFragment.php @@ -55,8 +55,8 @@ class OptionsFragment extends Fragment continue; } - if (isset($options[$token->value])) { - $lastOption = $options[$token->value]; + if (isset($options[strtoupper($token->value)])) { + $lastOption = $options[strtoupper($token->value)]; $lastOptionId = is_array($lastOption) ? $lastOption[0] : $lastOption; // Checking for option conflicts. @@ -78,10 +78,9 @@ class OptionsFragment extends Fragment // The only keywords that are expected are those which are // options. - if ($token->type === Token::TYPE_KEYWORD) { + if (($token->type === Token::TYPE_KEYWORD) && ($token->flags & Token::FLAG_KEYWORD_RESERVED)) { break; } - } if (is_array($lastOption)) { |