Skip to content

Commit a6a2d16

Browse files
alexporto2200cmb69
authored andcommitted
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
1 parent cf85eb2 commit a6a2d16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/ext_skel.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function process_args($argv, $argc) {
174174
{
175175
$val = $argv[$i];
176176

177-
if($val{0} != '-' || $val{1} != '-')
177+
if($val[0] != '-' || $val[1] != '-')
178178
{
179179
continue;
180180
}
@@ -203,7 +203,7 @@ function process_args($argv, $argc) {
203203
case 'ext':
204204
case 'dir':
205205
case 'author': {
206-
if (!isset($argv[$i + 1]) || ($argv[$i + 1]{0} == '-' && $argv[$i + 1]{1} == '-')) {
206+
if (!isset($argv[$i + 1]) || ($argv[$i + 1][0] == '-' && $argv[$i + 1][1] == '-')) {
207207
error('Argument "' . $val . '" expects a value, none passed');
208208
} else if ($opt == 'dir' && empty($argv[$i + 1])) {
209209
continue 2;

0 commit comments

Comments
 (0)