Permalink
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...
xtreamwayz committed Sep 4, 2012
1 parent 9c85cc3 commit 156cfc044f5cfd6583c0d39cd4e8234482bc3259
Showing with 2 additions and 2 deletions.
  1. +2 −2 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,
));
}

0 comments on commit 156cfc0

Please sign in to comment.