From 03fd9a312526206604547a9f0be0f5ba2a9e6228 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Fri, 9 Aug 2019 13:53:13 +0200 Subject: [PATCH 1/2] Make restore.php PHP 7.4 compatible --- administrator/components/com_joomlaupdate/restore.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_joomlaupdate/restore.php b/administrator/components/com_joomlaupdate/restore.php index 6ba00f9e0fa86..53fb225248693 100644 --- a/administrator/components/com_joomlaupdate/restore.php +++ b/administrator/components/com_joomlaupdate/restore.php @@ -6184,7 +6184,7 @@ public static function parse_ini_file($file, $process_sections = false, $raw_dat } // Sections - if ($line{0} == '[') + if ($line[0] == '[') { $tmp = explode(']', $line); $sections[] = trim(substr($tmp[0], 1)); @@ -6201,7 +6201,7 @@ public static function parse_ini_file($file, $process_sections = false, $raw_dat $tmp = explode(';', $value); if (count($tmp) == 2) { - if ((($value{0} != '"') && ($value{0} != "'")) || + if ((($value[0] != '"') && ($value[0] != "'")) || preg_match('/^".*"\s*;/', $value) || preg_match('/^".*;[^"]*$/', $value) || preg_match("/^'.*'\s*;/", $value) || preg_match("/^'.*;[^']*$/", $value) ) @@ -6211,11 +6211,11 @@ public static function parse_ini_file($file, $process_sections = false, $raw_dat } else { - if ($value{0} == '"') + if ($value[0] == '"') { $value = preg_replace('/^"(.*)".*/', '$1', $value); } - elseif ($value{0} == "'") + elseif ($value[0] == "'") { $value = preg_replace("/^'(.*)'.*/", '$1', $value); } From 60012136419941cb0c6827fed746c1eb7f23065e Mon Sep 17 00:00:00 2001 From: Richard Fath Date: Fri, 9 Aug 2019 14:17:18 +0200 Subject: [PATCH 2/2] Add note about modification to the header --- administrator/components/com_joomlaupdate/restore.php | 1 + 1 file changed, 1 insertion(+) diff --git a/administrator/components/com_joomlaupdate/restore.php b/administrator/components/com_joomlaupdate/restore.php index 53fb225248693..9fbe936e5e3d8 100644 --- a/administrator/components/com_joomlaupdate/restore.php +++ b/administrator/components/com_joomlaupdate/restore.php @@ -6,6 +6,7 @@ * * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version + * @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. */ /**