From 2462657d6090e36177bcb79231efabe32d6008b2 Mon Sep 17 00:00:00 2001 From: Cornelius Amzar <cornelius.amzar@bsz-bw.de> Date: Tue, 29 May 2018 07:09:42 -0400 Subject: [PATCH] Replaced create_function with an anonymous function - Makes EDS.php ready for PHP 7.2 --- module/VuFind/src/VuFind/RecordDriver/EDS.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php index 121ffc3c934..6a77afe19cf 100644 --- a/module/VuFind/src/VuFind/RecordDriver/EDS.php +++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php @@ -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; -- GitLab