Zend Framework

Using placement in Zend_View_Helper_FormRadio breaks setting of value

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.1
  • Fix Version/s: 1.5.3
  • Component/s: Zend_View
  • Labels:
    None
  • Fix Version Priority:
    Must Have

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;

Activity

Hide
Matthew Weier O'Phinney added a comment -

Scheduling for next mini release.

Show
Matthew Weier O'Phinney added a comment - Scheduling for next mini release.
Hide
Alex Peterson added a comment -

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

Show
Alex Peterson added a comment - oh man, finding this bug took me forever - and i arrived at the same conclusion as the poster.
Hide
Matthew Weier O'Phinney added a comment -

Fixed in trunk and 1.5 and 1.6 release branches.

Show
Matthew Weier O'Phinney added a comment - Fixed in trunk and 1.5 and 1.6 release branches.

People

Vote (2)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified