@@ -510,7 +510,7 @@ public static function json_decode(&$str) {
510
510
// A comma or the end.
511
511
if (
512
512
($ x === $ length ) ||
513
- ((', ' === $ chunk{ $ x } ) && 'slice ' === $ last ['type ' ])
513
+ ((', ' === $ chunk[ $ x ] ) && 'slice ' === $ last ['type ' ])
514
514
) {
515
515
$ slice = v_mb::substr ($ chunk , $ last ['from ' ], ($ x - $ last ['from ' ]));
516
516
$ slices [] = array (
@@ -542,29 +542,29 @@ public static function json_decode(&$str) {
542
542
}
543
543
// A new quote.
544
544
elseif (
545
- (('" ' === $ chunk{ $ x } ) || ("' " === $ chunk{ $ x } )) &&
545
+ (('" ' === $ chunk[ $ x ] ) || ("' " === $ chunk[ $ x ] )) &&
546
546
('string ' !== $ last ['type ' ])
547
547
) {
548
548
$ slices [] = array (
549
549
'type ' =>'string ' ,
550
550
'from ' =>$ x ,
551
- 'delimiter ' =>$ chunk{ $ x } ,
551
+ 'delimiter ' =>$ chunk[ $ x ] ,
552
552
);
553
553
}
554
554
// An end quote.
555
555
elseif (
556
- ($ chunk{ $ x } === $ last ['delimiter ' ]) &&
556
+ ($ chunk[ $ x ] === $ last ['delimiter ' ]) &&
557
557
('string ' === $ last ['type ' ]) &&
558
558
(
559
- ('\\' !== $ chunk{ $ x - 1 } ) ||
560
- (('\\' === $ chunk{ $ x - 1 } ) && ('\\' === $ chunk{ $ x - 2 } ))
559
+ ('\\' !== $ chunk[ $ x - 1 ] ) ||
560
+ (('\\' === $ chunk[ $ x - 1 ] ) && ('\\' === $ chunk[ $ x - 2 ] ))
561
561
)
562
562
) {
563
563
\array_pop ($ slices );
564
564
}
565
565
// Opening bracket (and we're in a slice/objectish thing.
566
566
elseif (
567
- ('[ ' === $ chunk{ $ x } ) &&
567
+ ('[ ' === $ chunk[ $ x ] ) &&
568
568
\in_array ($ last ['type ' ], array ('slice ' , 'array ' , 'object ' ), true )
569
569
) {
570
570
$ slices [] = array (
@@ -575,14 +575,14 @@ public static function json_decode(&$str) {
575
575
}
576
576
// Closing bracket.
577
577
elseif (
578
- ('] ' === $ chunk{ $ x } ) &&
578
+ ('] ' === $ chunk[ $ x ] ) &&
579
579
('array ' === $ last ['type ' ])
580
580
) {
581
581
\array_pop ($ slices );
582
582
}
583
583
// Opening brace (and we're in a slice/objectish thing.
584
584
elseif (
585
- ('{ ' === $ chunk{ $ x } ) &&
585
+ ('{ ' === $ chunk[ $ x ] ) &&
586
586
\in_array ($ last ['type ' ], array ('slice ' , 'array ' , 'object ' ), true )
587
587
) {
588
588
$ slices [] = array (
@@ -593,7 +593,7 @@ public static function json_decode(&$str) {
593
593
}
594
594
// Closing brace.
595
595
elseif (
596
- ('} ' === $ chunk{ $ x } ) &&
596
+ ('} ' === $ chunk[ $ x ] ) &&
597
597
('object ' === $ last ['type ' ])
598
598
) {
599
599
\array_pop ($ slices );
@@ -618,7 +618,7 @@ public static function json_decode(&$str) {
618
618
\array_pop ($ slices );
619
619
++$ x ;
620
620
for ($ y = $ last ['from ' ]; $ y <= $ x ; ++$ y ) {
621
- $ chunk{ $ y } = ' ' ;
621
+ $ chunk[ $ y ] = ' ' ;
622
622
}
623
623
}
624
624
}// End each char.
0 commit comments