zendframework/zf2 — pull request #2293 by gpeltink (2012-09-04 09:29:59+00:00)
Title: Pass the right validator options

This does not give the required result. It gives the isset result which is a boolean true or false.
(isset($this->attributes['min'])) ?: 0

I used a var_dump($options) in Zend\validator\GreatherThan.php

var_dump with min value 0:
array (size=2)
'min' => boolean true
'inclusive' => boolean true

var_dump with min value 5:
array (size=2)
'min' => boolean true
'inclusive' => boolean true

This does work. It adds the value as expected.
(isset($this->attributes['min'])) ? $this->attributes['min'] : 0,

var_dump with min value 0:
array (size=2)
'min' => int 0
'inclusive' => boolean true

var_dump with min value 5:
array (size=2)
'min' => int 5
'inclusive' => boolean true