Commit: ab6f7b782082a7d527c2b007d0a121f4022e1947 Author: Ben Ramsey <[email protected]> Tue, 5 Jan 2016 17:39:54 -0600 Parents: efbe95acad1af9eff209d128668d803dd80365c8 Branches: master
Link: http://git.php.net/?p=web/news.git;a=commitdiff;h=ab6f7b782082a7d527c2b007d0a121f4022e1947 Log: Use preg_replace_callback() instead of the deprecated "/e" modifier Changed paths: M common.php Diff: diff --git a/common.php b/common.php index ff50470..a6293d7 100644 --- a/common.php +++ b/common.php @@ -95,7 +95,13 @@ function recode_header($header, $basecharset) { if (strpos($header, "=?") === false) { return to_utf8($header, $basecharset); } - return preg_replace("/=\\?(.+?)\\?([qb])\\?(.+?)(\\?=|$)/ie", "decode_header('\\1','\\2','\\3')", $header); + return preg_replace_callback( + "/=\\?(.+?)\\?([qb])\\?(.+?)(\\?=|$)/i", + function ($m) { + return decode_header($m[1], $m[2], $m[3]); + }, + $header + ); } /* Email spam protection (taken from php-bugs-web) */ -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
