Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions administrator/components/com_joomlaupdate/restore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

/**
Expand Down Expand Up @@ -6184,7 +6185,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));
Expand All @@ -6201,7 +6202,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)
)
Expand All @@ -6211,11 +6212,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);
}
Expand Down