diff options
author | Simon Rettberg | 2021-03-25 14:33:38 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-03-25 14:33:38 +0100 |
commit | 5918ff8d0ddbaf5b7086bd051f2786ceb1ed6065 (patch) | |
tree | c265dd52f2ac078e5ab288fdf3220d469c702fee /inc | |
parent | [remoteaccess] Show plugin version (diff) | |
download | slx-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 'inc')
-rw-r--r-- | inc/database.inc.php | 2 | ||||
-rw-r--r-- | inc/user.inc.php | 6 | ||||
-rw-r--r-- | inc/util.inc.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/inc/database.inc.php b/inc/database.inc.php index 3e8ee0f8..a4f7c1b9 100644 --- a/inc/database.inc.php +++ b/inc/database.inc.php @@ -292,7 +292,7 @@ class Database continue; } $newkey = $key; - if ($newkey{0} !== ':') { + if ($newkey[0] !== ':') { $newkey = ":$newkey"; } $new = array(); diff --git a/inc/user.inc.php b/inc/user.inc.php index 20e8cd3d..2ad256af 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -31,7 +31,7 @@ class User if (!self::isLoggedIn()) return false; if (Module::isAvailable("permissionmanager")) { - if ($permission{0} === '.') { + if ($permission[0] === '.') { $permission = substr($permission, 1); } else { if (class_exists('Page')) { @@ -70,7 +70,7 @@ class User Message::addError('main.no-permission'); Util::redirect($redirect); } elseif (Module::isAvailable('permissionmanager')) { - if ($permission{0} !== '.') { + if ($permission[0] !== '.') { $module = Page::getModule(); if ($module !== false) { $permission = '.' . $module->getIdentifier() . '.' . $permission; @@ -88,7 +88,7 @@ class User if (!self::isLoggedIn()) return []; if (Module::isAvailable("permissionmanager")) { - if ($permission{0} === '.') { + if ($permission[0] === '.') { $permission = substr($permission, 1); } else { $module = Page::getModule(); diff --git a/inc/util.inc.php b/inc/util.inc.php index 365dc045..fbc894df 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -268,7 +268,7 @@ SADFACE; if (empty($path)) return false; $path = trim($path); - if ($path{0} == '/' || preg_match('/[\x00-\x19\?\*]/', $path)) + if ($path[0] == '/' || preg_match('/[\x00-\x19\?\*]/', $path)) return false; if (strpos($path, '..') !== false) return false; |