You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-29 22:41:11 +03:00
fix php8 moaning about { } on strings
This commit is contained in:
@ -319,11 +319,11 @@ class PostfixAdmin {
|
||||
public function parseParams($params) {
|
||||
$count = count($params);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
if ($params[$i] != '' && $params[$i]{0} === '-' && $params[$i] != '-1') {
|
||||
if ($params[$i] != '' && $params[$i][0] === '-' && $params[$i] != '-1') {
|
||||
$key = substr($params[$i], 1);
|
||||
if (isset($params[$i+1])) {
|
||||
# TODO: ideally we should know if a parameter can / must have a value instead of whitelisting known valid values starting with '-' (probably only bool doesn't need a value)
|
||||
if ($params[$i+1]{0} === '-' && $params[$i+1] != '-1') {
|
||||
if ($params[$i+1][0] === '-' && $params[$i+1] != '-1') {
|
||||
$this->params[$key] = true;
|
||||
} else {
|
||||
$this->params[$key] = $params[$i+1];
|
||||
|
Reference in New Issue
Block a user