Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/2438' into develop

Forward port #2438
  • Loading branch information...
commit 626f74fe4895fb22dcb3220cb9752618de418899 2 parents eaca3c3 + b92fb11
@weierophinney weierophinney authored
View
4 library/Zend/Form/Element/MultiCheckbox.php
@@ -63,8 +63,8 @@ public function setValueOptions(array $options)
{
$this->valueOptions = $options;
- // Update InArray validator haystack
- if (!is_null($this->validator)) {
+ // Update Explode validator haystack
+ if ($this->validator instanceof ExplodeValidator) {
$validator = $this->validator->getValidator();
$validator->setHaystack($this->getValueOptionsValues());
}
View
13 library/Zend/Form/Element/Select.php
@@ -83,8 +83,17 @@ public function setValueOptions(array $options)
// Update InArrayValidator validator haystack
if (!is_null($this->validator)) {
- $validator = $this->validator instanceof InArrayValidator ? $this->validator : $this->validator->getValidator();
- $validator->setHaystack($this->getValueOptionsValues());
+ if ($this->validator instanceof InArrayValidator){
+ $validator = $this->validator;
+ }
+ if ($this->validator instanceof ExplodeValidator
+ && $this->validator->getValidator() instanceof InArrayValidator
+ ){
+ $validator = $this->validator->getValidator();
+ }
+ if (!empty($validator)){
+ $validator->setHaystack($this->getValueOptionsValues());
+ }
}
return $this;
Please sign in to comment.
Something went wrong with that request. Please try again.