From 3a3d2847fd8253d54f91a2336b9f8b22b85b94e9 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 16 Aug 2016 17:37:02 +0200 Subject: [PATCH] Workaround E_DEPRECATED warning on Auth_SASL::factory() call (#29) https://pear.php.net/bugs/bug.php?id=21033 --- Net/SMTP.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Net/SMTP.php b/Net/SMTP.php index dd822a5..c410dec 100644 --- a/Net/SMTP.php +++ b/Net/SMTP.php @@ -701,7 +701,8 @@ protected function authDigestMD5($uid, $pwd, $authz = '') return $error; } - $digest = Auth_SASL::factory('digest-md5'); + $auth_sasl = new Auth_SASL; + $digest = $auth_sasl->factory('digest-md5'); $challenge = base64_decode($this->arguments[0]); $auth_str = base64_encode( $digest->getResponse($uid, $pwd, $challenge, $this->host, "smtp", $authz)