Commit a09cfd68 authored by Hans Salvisberg's avatar Hans Salvisberg
Browse files

Issue #2198587 by cs_shadow | oligodosh: Fixed Deprecated function: preg_replace().

parent f525968b
Loading
Loading
Loading
Loading
+5 −2
Changes for mailmime.inc: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -779,14 +779,17 @@ class MailMIME extends Mail_mime {
      )->headers;
    }
    foreach ($input as $name => $value) {
      $name = preg_replace_callback(
          '/([[:alpha:]])([[:alpha:]]+)/',
          create_function('$matches', 'return strtoupper($matches[1]) . strtolower($matches[2]);'),
        $name
      );
      $name = preg_replace(
        array(
          '/([[:alpha:]])([[:alpha:]]+)/e',
          '/^Mime-/',
          '/-Id$/',
        ),
        array(
          'strtoupper("\1") . strtolower("\2")',
          'MIME-',
          '-ID',
        ),