Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 92d4c98

Browse files
committed
replace deprecated {}
1 parent 935deea commit 92d4c98

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/blobfolio/common/ref/format.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ public static function json_decode(&$str) {
510510
// A comma or the end.
511511
if (
512512
($x === $length) ||
513-
((',' === $chunk{$x}) && 'slice' === $last['type'])
513+
((',' === $chunk[$x]) && 'slice' === $last['type'])
514514
) {
515515
$slice = v_mb::substr($chunk, $last['from'], ($x - $last['from']));
516516
$slices[] = array(
@@ -542,29 +542,29 @@ public static function json_decode(&$str) {
542542
}
543543
// A new quote.
544544
elseif (
545-
(('"' === $chunk{$x}) || ("'" === $chunk{$x})) &&
545+
(('"' === $chunk[$x]) || ("'" === $chunk[$x])) &&
546546
('string' !== $last['type'])
547547
) {
548548
$slices[] = array(
549549
'type'=>'string',
550550
'from'=>$x,
551-
'delimiter'=>$chunk{$x},
551+
'delimiter'=>$chunk[$x],
552552
);
553553
}
554554
// An end quote.
555555
elseif (
556-
($chunk{$x} === $last['delimiter']) &&
556+
($chunk[$x] === $last['delimiter']) &&
557557
('string' === $last['type']) &&
558558
(
559-
('\\' !== $chunk{$x - 1}) ||
560-
(('\\' === $chunk{$x - 1}) && ('\\' === $chunk{$x - 2}))
559+
('\\' !== $chunk[$x - 1]) ||
560+
(('\\' === $chunk[$x - 1]) && ('\\' === $chunk[$x - 2]))
561561
)
562562
) {
563563
\array_pop($slices);
564564
}
565565
// Opening bracket (and we're in a slice/objectish thing.
566566
elseif (
567-
('[' === $chunk{$x}) &&
567+
('[' === $chunk[$x]) &&
568568
\in_array($last['type'], array('slice', 'array', 'object'), true)
569569
) {
570570
$slices[] = array(
@@ -575,14 +575,14 @@ public static function json_decode(&$str) {
575575
}
576576
// Closing bracket.
577577
elseif (
578-
(']' === $chunk{$x}) &&
578+
(']' === $chunk[$x]) &&
579579
('array' === $last['type'])
580580
) {
581581
\array_pop($slices);
582582
}
583583
// Opening brace (and we're in a slice/objectish thing.
584584
elseif (
585-
('{' === $chunk{$x}) &&
585+
('{' === $chunk[$x]) &&
586586
\in_array($last['type'], array('slice', 'array', 'object'), true)
587587
) {
588588
$slices[] = array(
@@ -593,7 +593,7 @@ public static function json_decode(&$str) {
593593
}
594594
// Closing brace.
595595
elseif (
596-
('}' === $chunk{$x}) &&
596+
('}' === $chunk[$x]) &&
597597
('object' === $last['type'])
598598
) {
599599
\array_pop($slices);
@@ -618,7 +618,7 @@ public static function json_decode(&$str) {
618618
\array_pop($slices);
619619
++$x;
620620
for ($y = $last['from']; $y <= $x; ++$y) {
621-
$chunk{$y} = ' ';
621+
$chunk[$y] = ' ';
622622
}
623623
}
624624
}// End each char.

0 commit comments

Comments
 (0)