mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Update array access syntax deprecated
Update array access syntax deprecated in line 175 and 204 Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 175 Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 204
This commit is contained in:
parent
cf85eb2468
commit
a6a2d167d8
@ -174,7 +174,7 @@ function process_args($argv, $argc) {
|
||||
{
|
||||
$val = $argv[$i];
|
||||
|
||||
if($val{0} != '-' || $val{1} != '-')
|
||||
if($val[0] != '-' || $val[1] != '-')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -203,7 +203,7 @@ function process_args($argv, $argc) {
|
||||
case 'ext':
|
||||
case 'dir':
|
||||
case 'author': {
|
||||
if (!isset($argv[$i + 1]) || ($argv[$i + 1]{0} == '-' && $argv[$i + 1]{1} == '-')) {
|
||||
if (!isset($argv[$i + 1]) || ($argv[$i + 1][0] == '-' && $argv[$i + 1][1] == '-')) {
|
||||
error('Argument "' . $val . '" expects a value, none passed');
|
||||
} else if ($opt == 'dir' && empty($argv[$i + 1])) {
|
||||
continue 2;
|
||||
|
Loading…
Reference in New Issue
Block a user