Zend Framework

Zend_View_Helper_PartialLoop throws exceptions when given an empty array

Details

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

Description

This if statement in partialLoop() evaluates to true when given an empty array. This should not be the case, as exceptions will be thrown when module name is given.

Starts on line 57:

if ((null == $model) && (null !== $module)) {
    $model  = $module;
    $module = null;
}

Should read:

if ((null === $model) && (null !== $module)) {
    $model  = $module;
    $module = null;
}

Notice the triple ===.

Activity

Hide
Wil Sinclair added a comment -

Please evaluate and categorize as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize as necessary.
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
Matthew Weier O'Phinney added a comment -

Test added in trunk and 1.5 release branch; unable to reproduce, but changes for other bugs may have fixed this previously. (Commit as of r9374)

Show
Matthew Weier O'Phinney added a comment - Test added in trunk and 1.5 release branch; unable to reproduce, but changes for other bugs may have fixed this previously. (Commit as of r9374)

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

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