Issues

ZF-3206: Using placement in Zend_View_Helper_FormRadio breaks setting of value

Description

When i set a placement for the formRadio Helper, the given value used for setting the checked attribute is overridden. This happens in the formRadion function while the label attributes are processed:


case 'placement':
  unset($label_attribs[$key]);
  $value = strtolower($val); <- $value is a function parameter and used for checked attribute
  if (in_array($val, array('prepend', 'append'))) {
      $labelPlacement = $val;
  }
  break;

This should be like this i think:


case 'placement':
  unset($label_attribs[$key]);
  $val = strtolower($val);
  if (in_array($val, array('prepend', 'append'))) {
      $labelPlacement = $val;
  }
  break;

Comments

Scheduling for next mini release.

oh man, finding this bug took me forever - and i arrived at the same conclusion as the poster.

Fixed in trunk and 1.5 and 1.6 release branches.