]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
No static calls (PEAR sucks ass)
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 9 Jul 2015 20:26:03 +0000 (22:26 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 9 Jul 2015 20:26:03 +0000 (22:26 +0200)
lib/mail.php

index 188792d02a0511fab7493318435a05604a8bb50a..7ac743bfee8d58fa9dae64de2bf3a0af0cfae725 100644 (file)
@@ -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);
         }
     }