Skip to content

Commit f666b7d

Browse files
committed
Replace deprecated curly brace uses in fcgi.inc
1 parent 5d79e94 commit f666b7d

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

sapi/fpm/tests/fcgi.inc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -362,19 +362,19 @@ class Client
362362

363363
while ($p != $length) {
364364

365-
$nlen = ord($data{$p++});
365+
$nlen = ord($data[$p++]);
366366
if ($nlen >= 128) {
367367
$nlen = ($nlen & 0x7F << 24);
368-
$nlen |= (ord($data{$p++}) << 16);
369-
$nlen |= (ord($data{$p++}) << 8);
370-
$nlen |= (ord($data{$p++}));
368+
$nlen |= (ord($data[$p++]) << 16);
369+
$nlen |= (ord($data[$p++]) << 8);
370+
$nlen |= (ord($data[$p++]));
371371
}
372-
$vlen = ord($data{$p++});
372+
$vlen = ord($data[$p++]);
373373
if ($vlen >= 128) {
374374
$vlen = ($nlen & 0x7F << 24);
375-
$vlen |= (ord($data{$p++}) << 16);
376-
$vlen |= (ord($data{$p++}) << 8);
377-
$vlen |= (ord($data{$p++}));
375+
$vlen |= (ord($data[$p++]) << 16);
376+
$vlen |= (ord($data[$p++]) << 8);
377+
$vlen |= (ord($data[$p++]));
378378
}
379379
$array[substr($data, $p, $nlen)] = substr($data, $p+$nlen, $vlen);
380380
$p += ($nlen + $vlen);
@@ -392,12 +392,12 @@ class Client
392392
private function decodePacketHeader($data)
393393
{
394394
$ret = array();
395-
$ret['version'] = ord($data{0});
396-
$ret['type'] = ord($data{1});
397-
$ret['requestId'] = (ord($data{2}) << 8) + ord($data{3});
398-
$ret['contentLength'] = (ord($data{4}) << 8) + ord($data{5});
399-
$ret['paddingLength'] = ord($data{6});
400-
$ret['reserved'] = ord($data{7});
395+
$ret['version'] = ord($data[0]);
396+
$ret['type'] = ord($data[1]);
397+
$ret['requestId'] = (ord($data[2]) << 8) + ord($data[3]);
398+
$ret['contentLength'] = (ord($data[4]) << 8) + ord($data[5]);
399+
$ret['paddingLength'] = ord($data[6]);
400+
$ret['reserved'] = ord($data[7]);
401401
return $ret;
402402
}
403403

@@ -634,7 +634,7 @@ class Client
634634
// Reset timeout
635635
$this->set_ms_timeout($this->_readWriteTimeout);
636636

637-
switch (ord($resp['content']{4})) {
637+
switch (ord($resp['content'][4])) {
638638
case self::CANT_MPX_CONN:
639639
throw new \Exception('This app can\'t multiplex [CANT_MPX_CONN]');
640640
break;

0 commit comments

Comments
 (0)