[dev] imp's fetchmail support

Jan Schneider jan at horde.org
Wed May 7 00:38:09 PDT 2003


Zitat von John Morrissey <jwm at horde.net>:

> The 'POP3 Auto' fetchmail option sounds like it will autodetect the most
> secure protocol that the server will accept. However:
>
>         foreach ($protocols as $protocol) {
>             $this->_params['protocol'] = $protocol;
>             $mail_socket = $this->_connect();
>             if (!is_a($mail_socket, 'PEAR_Error')) {
>                 break;
>             }
>         }
>
>         if (is_a($mail_socket, 'PEAR_Error')) {
>             return $mail_socket;
>         }
>
> The code returns on the first failure instead of continuing on to other
> (albeit less secure) choices.
>
> Is this a correct assessment? If so, I'll submit a fix.

No, the opposite is correct. It breaks the loop if it found a protocol that
*didn't* create an error.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list