ZF-3083: Zend_View_Helper_PartialLoop throws exceptions when given an empty array

Issue Type: Bug Created: 2008-04-09T11:51:00.000+0000 Last Updated: 2008-05-05T10:35:53.000+0000 Status: Resolved Fix version(s): - 1.5.2 (15/May/08)

Reporter: Robin Skoglund (robinsk) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments:


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:

<pre class="highlight">
if ((null == $model) && (null !== $module)) {
    $model  = $module;
    $module = null;

Should read:

<pre class="highlight">
if ((null === $model) && (null !== $module)) {
    $model  = $module;
    $module = null;

Notice the triple ===.


Posted by Wil Sinclair (wil) on 2008-04-18T13:16:14.000+0000

Please evaluate and categorize as necessary.

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-22T12:16:37.000+0000

Scheduling for next mini release.

Posted by Matthew Weier O'Phinney (matthew) on 2008-05-05T10:35:53.000+0000

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)

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.