From 5e4125a383f92288e27b87f09989182a1e54d91c Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 27 May 2015 16:00:55 -0500 Subject: [PATCH] oops: Fix crash processing email on PHP 5.3 --- include/class.mailer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/class.mailer.php b/include/class.mailer.php index 023a061a6..a752d4043 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -209,6 +209,7 @@ class Mailer { if (count($parts) < 2) return $rv; + $self = get_called_class(); $decoders = array( 'A' => function($id, $tag) use ($sig) { // Old format was VA-B-C-D@sig, where C was the packed tag and D @@ -221,11 +222,11 @@ class Mailer { } return false; }, - 'B' => function($id, $tag) { + 'B' => function($id, $tag) use ($self) { $format = 'Vuid/VentryId/VthreadId/auserClass/a*sig'; if ($tag && ($tag = base64_decode($tag))) { $info = unpack($format, $tag); - $sysid = static::getSystemMessageIdCode(); + $sysid = $self::getSystemMessageIdCode(); $shorttag = substr($tag, 0, 13); $chksig = substr(hash_hmac('sha1', $shorttag.$id.$sysid, SECRET_SALT, true), -5); -- GitLab