From 5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 25 Mar 2021 14:33:38 +0100 Subject: Fix deprecated curly braces string indexing (PHP 7.4) --- modules-available/serversetup-bwlp-ipxe/page.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules-available/serversetup-bwlp-ipxe/page.inc.php') diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php index e31814d1..bc13ab6a 100644 --- a/modules-available/serversetup-bwlp-ipxe/page.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php @@ -223,7 +223,7 @@ class Page_ServerSetup extends Page 'snp' => [Dictionary::translate('dl-snp', true) => 63], ]; foreach ($list as $file) { - if ($file{0} === '.') + if ($file[0] === '.') continue; if (is_file($file)) { $base = basename($file); @@ -430,7 +430,7 @@ class Page_ServerSetup extends Page foreach ($menu['entrylist'] as &$bootentry) { if (!isset($bootentry['data']) || !isset($bootentry['module'])) continue; - if ($bootentry['module']{0} !== '.') { + if ($bootentry['module'][0] !== '.') { // Hook from other module $bootentry['moduleName'] = Dictionary::translateFileModule($bootentry['module'], 'module', 'module_name'); if (!$bootentry['moduleName']) { @@ -510,7 +510,7 @@ class Page_ServerSetup extends Page Message::addError('invalid-boot-entry', $id); Util::redirect('?do=serversetup'); } - if ($row['module']{0} === '.') { + if ($row['module'][0] === '.') { // either script or exec entry $json = json_decode($row['data'], true); if (!is_array($json)) { @@ -834,7 +834,7 @@ class Page_ServerSetup extends Page } $module = false; $type = Request::post('type', false, 'string'); - if ($type{0} === '.') { + if ($type[0] === '.') { // Exec or script if ($type === '.exec') { $entry = BootEntry::newStandardBootEntry($data); -- cgit v1.2.3-55-g7522