validateOptionTypes checking existence of key rather than value

This commit is contained in:
Evan Kaufman 2012-08-03 12:17:58 -05:00
parent c6a9638adb
commit aa890aedfc

View File

@ -312,7 +312,7 @@ class OptionsResolver implements OptionsResolverInterface
private function validateOptionTypes(array $options)
{
foreach ($this->allowedTypes as $option => $allowedTypes) {
if (!isset($options[$option])) {
if (!array_key_exists($option, $options)) {
continue;
}