Closed tasmaniski closed 6 years ago
@tasmaniski
So, it should be filtered from NULL to 0
Sorry, this is wrong, because:
0
is concrete valuenull
represents no valueSo it works like described:
Zend\Filter\ToInt
allows you to transform a scalar value into an integer.
https://docs.zendframework.com/zend-filter/standard-filters/#toint
Using zend input filter I find a bug in a case when I don't send data key to the filter,
but still want to transform/filter data value. So, it should be filtered from NULL to 0
I suppose this part of the code should skip: array, object and resource
But unfortunately it skiped NULL value also.
Source: https://github.com/zendframework/zend-filter/blob/master/src/ToInt.php#L26