Wouldn't the if statement in this PHP function be useless?
<p>I am trying to work on someones code and ran into this. </p>

<pre><code>private function getAttImages($limit, $forumIds = 0, $fidsReverse = false, $topicIds = 0, $membersIds = 0, $order = 'attach_date', $sort = 'desc', $group = null)
    {
        $fids = '';

        if ($forumIds)
        {
            $r = '';
            if ($fidsReverse)
            {
                $r = ' NOT ';
            }

            if (is_array($forumIds))
            {
                $forumIds = implode(',', $forumIds);
            }

            $fids = ' AND forums_topics.forum_id ' . $r . ' IN (' . $forumIds .  ')';
        }
</code></pre>

<p>function continues to other things.  However, the question is that first if statement if($forumIds) wouldn't it be useless if every time this function is called $forumIds is set to 0 ?</p>