Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass the right validator options

Same issue as with zendframework#2293

It passes the value of isset and not the min/step attribute.
  • Loading branch information...
commit 156cfc044f5cfd6583c0d39cd4e8234482bc3259 1 parent 9c85cc3
@xtreamwayz xtreamwayz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 library/Zend/Form/Element/Number.php
View
4 library/Zend/Form/Element/Number.php
@@ -77,8 +77,8 @@ protected function getValidators()
|| 'any' !== $this->attributes['step']
) {
$validators[] = new StepValidator(array(
- 'baseValue' => (isset($this->attributes['min'])) ?: 0,
- 'step' => (isset($this->attributes['step'])) ?: 1,
+ 'baseValue' => (isset($this->attributes['min'])) ? $this->attributes['min'] : 0,
+ 'step' => (isset($this->attributes['step'])) ? $this->attributes['step'] : 1,
));
}
Please sign in to comment.
Something went wrong with that request. Please try again.