ZF-11150: setCommentCount() doesn't allow 0

Issue Type: Bug Created: 2011-03-09T07:19:25.000+0000 Last Updated: 2011-05-03T14:29:37.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: Benjamin Clot (benjy) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Feed_Writer

Related issues: Attachments:



In the class Zend_Feed_Writer_Entry, the function setCommentCount() returns an exception if $count is empty... so it returns an exception when set to 0, which is a perfectly good comment count, don't you think? :)

<pre class="highlight">
    public function setCommentCount($count)
        if (empty($count) || !is_numeric($count) || (int) $count < 0) {

should be replaced with

<pre class="highlight">
    public function setCommentCount($count = 0)
        if (!is_numeric($count) || (int) $count < 0) {


Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T18:27:44.000+0000

Fixed in trunk r23909

Posted by Adam Lundrigan (adamlundrigan) on 2011-05-03T14:29:37.000+0000

Merged to release branch 1.11 r23965

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.