From: Mikael Nordfeldth Date: Thu, 9 Jul 2015 20:26:03 +0000 (+0200) Subject: No static calls (PEAR sucks ass) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed248f7f5ab75f4e8a27a772ac975c9e5664851b;p=quix0rs-gnu-social.git No static calls (PEAR sucks ass) --- diff --git a/lib/mail.php b/lib/mail.php index 188792d02a..7ac743bfee 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -47,11 +47,13 @@ require_once 'Mail.php'; function mail_backend() { static $backend = null; + global $_PEAR; if (!$backend) { - $backend = Mail::factory(common_config('mail', 'backend'), + $mail = new Mail(); + $backend = $mail->factory(common_config('mail', 'backend'), common_config('mail', 'params') ?: array()); - if (PEAR::isError($backend)) { + if ($_PEAR->isError($backend)) { common_server_error($backend->getMessage(), 500); } }