From d555d1bbc87feb6801a4f68b94f5c1f5614f4d1a Mon Sep 17 00:00:00 2001 From: Daniel Royston Date: Mon, 5 Aug 2013 00:00:48 -0700 Subject: [PATCH] Addresses issue #1463. Replaces preg_replace '\e' modifier with preg_replace_callback as '\e' is depracated as of PHP 5.5.0. --- includes/functions-html.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/functions-html.php b/includes/functions-html.php index 92c710e..4d47d17 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -579,7 +579,11 @@ function yourls_table_add_row( $keyword, $url, $title = '', $ip, $clicks, $times $row = ""; foreach( $cells as $cell_id => $elements ) { $row .= sprintf( '', $cell_id, $cell_id . '-' . $id ); - $row .= preg_replace( '/%([^%]+)?%/e', '$elements["$1"]', $elements['template'] ); + $row .= preg_replace_callback( '/%([^%]+)?%/', + function($match) { + return $elements[$match[0]]; + }, + $elements['template'] ); $row .= ''; } $row .= ""; -- 2.45.0