bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

Error in SMTP class // scripts aborts, no error handling possible #1278

Open iFlash opened 7 months ago

iFlash commented 7 months ago

In line 202 of the SMTP class, we find this construct:

            if (!$socket) {
                $fw->error(500,$errstr);
                return FALSE;
            }

This seems to be wrong: If the socket can not be established, the script aborts with an error 500, and the return false; never gets executed; thus, no further error handling is possible.

The line throwing the error has to be removed IMHO.

ikkez commented 7 months ago

Not quite right.. if you set the system variable HALT = FALSE the error handler wont abort further code execution. Also a custom error handler might handle it differently.