ZF-8587: Zend_View_Helper_FormRadio problem to value check
Description
Problem Zend_View_Helper_FormRadio, line 152
in_array($opt_value, $value)
change for
in_array($opt_value, $value, true)
Problem Zend_View_Helper_FormRadio, line 152
in_array($opt_value, $value)
change for
in_array($opt_value, $value, true)
Comments
Posted by Ramon Henrique Ornelas (ramon) on 2009-12-19T19:48:54.000+0000
Patch of the test unit.
Posted by Sebastian Wilczy?ski (sebastianw) on 2010-02-09T07:53:52.000+0000
Before values get to this point they are all being converted to string so adding "true" wont help.
Here is what I think:
<?php foreach($value as $k => $v) { if(is_numeric($v)) { $value[$k] = intval($v); } } if (in_array($opt_value, $value, true)) { $checked = ' checked="checked"'; } ?>Posted by Sebastian Wilczynski (noisemc) on 2012-01-09T17:05:19.000+0000
Patch for FormRadio.php