Commit 5c0d954f authored by Георгий Попов's avatar Георгий Попов Committed by George Popoff

Исправил устаревшую функцию preg_replace с модификатором 'e' на preg_replace_callback

parent 325f34f6
......@@ -154,7 +154,9 @@ function getFormatingUrl($url) {
}
//заменить протокол на нижний регистр: hTtP -> http
$url = preg_replace("~^[a-z]+~ie","strtolower('\\0')", $url);
$url = preg_replace_callback("|^[a-z]+|i", function (array $matches) {
return strtolower($matches[0]);
}, $url);
return $url;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment