Skip to content
Snippets Groups Projects
Commit 2462657d authored by Cornelius Amzar's avatar Cornelius Amzar Committed by Demian Katz
Browse files

Replaced create_function with an anonymous function

- Makes EDS.php ready for PHP 7.2
parent bd50bdd3
No related merge requests found
......@@ -408,10 +408,10 @@ class EDS extends SolrDefault
{
$linkedString = preg_replace_callback(
"/\b(https?):\/\/([-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]*)\b/i",
create_function(
'$matches',
'return "<a href=\'".($matches[0])."\'>".($matches[0])."</a>";'
),
function ($matches) {
return "<a href='" . $matches[0] . "'>"
. htmlentities($matches[0]) . "</a>";
},
$string
);
return $linkedString;
......
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