Skip to content
This repository
Browse code

Merge branch 'hotfix/2438' into develop

Forward port #2438
  • Loading branch information...
commit 626f74fe4895fb22dcb3220cb9752618de418899 2 parents eaca3c3 + b92fb11
Matthew Weier O'Phinney weierophinney authored
4 library/Zend/Form/Element/MultiCheckbox.php
@@ -63,8 +63,8 @@ public function setValueOptions(array $options)
63 63 {
64 64 $this->valueOptions = $options;
65 65
66   - // Update InArray validator haystack
67   - if (!is_null($this->validator)) {
  66 + // Update Explode validator haystack
  67 + if ($this->validator instanceof ExplodeValidator) {
68 68 $validator = $this->validator->getValidator();
69 69 $validator->setHaystack($this->getValueOptionsValues());
70 70 }
13 library/Zend/Form/Element/Select.php
@@ -83,8 +83,17 @@ public function setValueOptions(array $options)
83 83
84 84 // Update InArrayValidator validator haystack
85 85 if (!is_null($this->validator)) {
86   - $validator = $this->validator instanceof InArrayValidator ? $this->validator : $this->validator->getValidator();
87   - $validator->setHaystack($this->getValueOptionsValues());
  86 + if ($this->validator instanceof InArrayValidator){
  87 + $validator = $this->validator;
  88 + }
  89 + if ($this->validator instanceof ExplodeValidator
  90 + && $this->validator->getValidator() instanceof InArrayValidator
  91 + ){
  92 + $validator = $this->validator->getValidator();
  93 + }
  94 + if (!empty($validator)){
  95 + $validator->setHaystack($this->getValueOptionsValues());
  96 + }
88 97 }
89 98
90 99 return $this;

0 comments on commit 626f74f

Please sign in to comment.
Something went wrong with that request. Please try again.