I've got this call to Pear Mailer that gives me warnings not to be called statically but it works and I'm fully aware of that warning. Can I suppress it with an @
as I need other warnings?
$mail_smtp_public =& Mail::factory("smtp", $smtp_params_public);
These, obviously, do not work:
$mail_smtp_public =& @Mail::factory("smtp", $smtp_params_public);
$mail_smtp_public =& Mail::@factory("smtp", $smtp_params_public);
Maybe try this:
@$mail_smtp_public =& Mail::factory("smtp", $smtp_params_public);
or
try {
$mail_smtp_public =& Mail::factory("smtp", $smtp_params_public);
if ($mail_smtp_public) {
throw new Exception('Your other message');
}
} catch(Exception $e) {
echo $e->getMessage();
}