[dev] Re: [cvs] commit: imp/lib Compose.php

Jon Parise jon at horde.org
Sat Feb 1 14:22:46 PST 2003


On Fri, Jan 31, 2003 at 02:29:54PM -0800, Chuck Hagenbuch wrote:

>   http://cvs.horde.org/diff.php/imp/lib/Compose.php?r1=1.18&r2=1.19&ty=u
 
Looking at this diff, I see the following:

    if (array_key_exists('smtphost', $_SESSION['imp']) &&
        !empty($imp['smtphost'])) {
        $params['host'] = $imp['smtphost'];
    }

Doesn't the !empty() call make the array_key_exists() call redundant?
And shouldn't the empty() call also be using $_SESSION['imp'] if it's
important to use it in the array_key_exists() call?

-- 
Jon Parise (jon at horde.org) :: The Horde Project (http://horde.org/)


More information about the dev mailing list