From 01d99689471d8f719870f3a9154dbb3999354687 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 19 Sep 2020 14:50:53 -0400 Subject: [PATCH] Remove usage of deprecated e preg_replace modifier. --- framework/kernel.php | 17 ----------------- framework/mail.php | 2 +- framework/template.php | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/framework/kernel.php b/framework/kernel.php index c1149e2..c4d7c2f 100644 --- a/framework/kernel.php +++ b/framework/kernel.php @@ -1098,23 +1098,6 @@ class ISSO // source control $scinfo = 'Not Under Source Control'; - if (defined('SVN')) - { - $scinfo = constant('SVN'); - - if (preg_match('#\$Id:?\s*\$#', $scinfo)) - { - $scinfo = 'Not Under Source Control'; - } - else - { - $scinfo = preg_replace('#\$' . '(Head)?URL: (.+?) \$#e', "end(explode('/', '\\2'))", $scinfo); - $scinfo = preg_replace('#\$' . '(LastModified)?Revision: (.+?) \$#', 'SVN \\2', $scinfo); - $scinfo = preg_replace('#\$' . 'Id: (.+?) ([0-9].+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', $scinfo); - } - } - - $scinfo = trim($scinfo); $debug .= "\n\t
  • Source Control: $scinfo
  • "; // query information diff --git a/framework/mail.php b/framework/mail.php index ea3b648..e116fc3 100644 --- a/framework/mail.php +++ b/framework/mail.php @@ -361,7 +361,7 @@ class Mail // perform this on non-ASCII characters; excluding _ and = because we want them to be encoded as they have // different meanings in mail messages - $text = preg_replace('#([^a-zA-Z0-9\+\-\*!/])#e', '"=" . strtoupper(dechex(ord("\\1")))', $text); + $text = preg_replace_callback('#([^a-zA-Z0-9\+\-\*!/])#', function ($matches) { return '=' . strtoupper(dechex(ord($matches[1]))); }, $text); $text = str_replace('=20', '_' , $text); return '=?' . $this->charset . '?q?' . $text . '?='; diff --git a/framework/template.php b/framework/template.php index 90f6103..9736321 100644 --- a/framework/template.php +++ b/framework/template.php @@ -449,7 +449,7 @@ class Template } // Process the empty phrase objects -- do this now so we don't have to worry about it when we're parsing later - $template = preg_replace('#\{@\\\"(.*?)\\\"\}#ise', '$this->_phrase_string(\'$1\')', $template); + $template = preg_replace_callback('#\{@\\\"(.*?)\\\"\}#is', function($matches) { return $this->_phrase_string($matches[1]); }, $template); return $template; } -- 2.43.5