summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe
diff options
context:
space:
mode:
authorSimon Rettberg2021-03-25 14:33:38 +0100
committerSimon Rettberg2021-03-25 14:33:38 +0100
commit5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065 (patch)
treec265dd52f2ac078e5ab288fdf3220d469c702fee /modules-available/serversetup-bwlp-ipxe
parent[remoteaccess] Show plugin version (diff)
downloadslx-admin-5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065.tar.gz
slx-admin-5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065.tar.xz
slx-admin-5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065.zip
Fix deprecated curly braces string indexing (PHP 7.4)
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe')
-rw-r--r--modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php2
-rw-r--r--modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php4
-rw-r--r--modules-available/serversetup-bwlp-ipxe/inc/pxelinux.inc.php2
-rw-r--r--modules-available/serversetup-bwlp-ipxe/page.inc.php8
4 files changed, 8 insertions, 8 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
index 614f5ee4..8aef52e7 100644
--- a/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
@@ -37,7 +37,7 @@ abstract class BootEntry
*/
public static function fromJson($module, $data)
{
- if ($module{0} !== '.') {
+ if ($module[0] !== '.') {
// Hook from other module
$hook = Hook::loadSingle($module, 'ipxe-bootentry');
if ($hook === false) {
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php
index 29885588..e2e90c2a 100644
--- a/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php
@@ -466,7 +466,7 @@ class IPxe
$script .= "set netX/{$opt}:{$type} {$args[$i]} || goto %fail%\n";
}
}
- } elseif ($arg{0} === '-') {
+ } elseif ($arg[0] === '-') {
continue;
} elseif ($file === false) {
$file = self::parseFile($arg);
@@ -536,7 +536,7 @@ class IPxe
{
$items = preg_split('/\s+/', $modifier, -1, PREG_SPLIT_NO_EMPTY);
foreach ($items as $item) {
- if ($item{0} === '-') {
+ if ($item[0] === '-') {
$item = preg_quote(substr($item, 1), '/');
$cmdLine = preg_replace('/(^|\s)' . $item . '(=\S*)?($|\s)/', ' ', $cmdLine);
} else {
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/pxelinux.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/pxelinux.inc.php
index 3f406767..13c9a86c 100644
--- a/modules-available/serversetup-bwlp-ipxe/inc/pxelinux.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/inc/pxelinux.inc.php
@@ -253,7 +253,7 @@ class PxeSection
public function mangle()
{
if (($i = strpos($this->title, '^')) !== false) {
- $this->hotkey = strtoupper($this->title{$i+1});
+ $this->hotkey = strtoupper($this->title[$i+1]);
$this->title = substr($this->title, 0, $i) . substr($this->title, $i + 1);
}
if (strpos($this->append, 'initrd=') !== false) {
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);