Skip to content

Commit

Permalink
Use square bracket syntax for string offset as curly bracket syntax h…
Browse files Browse the repository at this point in the history
…as been deprecated in PHP 7.4
  • Loading branch information
Nathaniel McHugh committed Jul 6, 2020
1 parent 423f0e5 commit 88aac94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PHPGGC.php
Expand Up @@ -623,7 +623,7 @@ function _parse_cmdline_arg(&$i, &$argv, &$parameters, &$options)

foreach($valid_arguments as $k => $v)
{
$abbreviations[$k] = $k{0};
$abbreviations[$k] = $k[0];
}

$abbreviations = [
Expand Down Expand Up @@ -700,7 +700,7 @@ protected function parse_cmdline($argv)
break;
}
# This is a parameter or an option
if(strlen($arg) >= 2 && $arg{0} == '-')
if(strlen($arg) >= 2 && $arg[0] == '-')
$this->_parse_cmdline_arg($i, $argv, $parameters, $options);
# This is a value
else
Expand Down

0 comments on commit 88aac94

Please sign in to comment.