ZF-11150: setCommentCount() doesn't allow 0
Description
Hi,
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? :)
public function setCommentCount($count)
{
if (empty($count) || !is_numeric($count) || (int) $count < 0) {
should be replaced with
public function setCommentCount($count = 0)
{
if (!is_numeric($count) || (int) $count < 0) {
Comments
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