Skip to content

Commit

Permalink
Merge pull request #76 from natmchugh/master
Browse files Browse the repository at this point in the history
Use square bracket syntax for string offset
  • Loading branch information
cfreal committed Jul 6, 2020
2 parents 423f0e5 + 88aac94 commit c667e05
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 c667e05

Please sign in to comment.