File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,12 @@ public function execute(): void
2828 $ invokerClass = $ this ->popFromOperandStack ();
2929
3030
31- $ arguments = array_fill (0 , $ parsedSignature ['arguments_count ' ] - 1 , null );
32- for ($ i = $ parsedSignature ['arguments_count ' ] - 1 ; $ i >= 0 ; $ i --) {
33- $ arguments [$ i ] = $ this ->popFromOperandStack ();
31+ $ arguments = [];
32+ if (($ length = $ parsedSignature ['arguments_count ' ] - 1 ) >= 0 ) {
33+ $ arguments = array_fill (0 , $ length , null );
34+ for ($ i = $ length ; $ i >= 0 ; $ i --) {
35+ $ arguments [$ i ] = $ this ->popFromOperandStack ();
36+ }
3437 }
3538
3639 $ methodName = $ cpInfo [$ nameAndTypeIndex ->getNameIndex ()]->getString ();
Original file line number Diff line number Diff line change @@ -30,9 +30,12 @@ public function execute(): void
3030 [$ resourceType , $ classObject ] = $ this ->getOptions ('class_resolver ' )
3131 ->resolve ($ cpInfo [$ cpInfo [$ cp ->getClassIndex ()]->getClassIndex ()]->getString ());
3232
33- $ arguments = array_fill (0 , $ signature ['arguments_count ' ] - 1 , null );
34- for ($ i = $ signature ['arguments_count ' ] - 1 ; $ i >= 0 ; $ i --) {
35- $ arguments [$ i ] = $ this ->popFromOperandStack ();
33+ $ arguments = [];
34+ if (($ length = $ signature ['arguments_count ' ] - 1 ) >= 0 ) {
35+ $ arguments = array_fill (0 , $ length , null );
36+ for ($ i = $ length ; $ i >= 0 ; $ i --) {
37+ $ arguments [$ i ] = $ this ->popFromOperandStack ();
38+ }
3639 }
3740
3841 $ return = null ;
Original file line number Diff line number Diff line change @@ -29,9 +29,12 @@ public function execute(): void
2929 // signature
3030 $ signature = Formatter::parseSignature ($ cpInfo [$ nameAndTypeIndex ->getDescriptorIndex ()]->getString ());
3131
32- $ arguments = array_fill (0 , $ signature ['arguments_count ' ] - 1 , null );
33- for ($ i = $ signature ['arguments_count ' ] - 1 ; $ i >= 0 ; $ i --) {
34- $ arguments [$ i ] = $ this ->popFromOperandStack ();
32+ $ arguments = [];
33+ if (($ length = $ signature ['arguments_count ' ] - 1 ) >= 0 ) {
34+ $ arguments = array_fill (0 , $ length , null );
35+ for ($ i = $ length ; $ i >= 0 ; $ i --) {
36+ $ arguments [$ i ] = $ this ->popFromOperandStack ();
37+ }
3538 }
3639
3740 $ invokerClass = $ this ->popFromOperandStack ();
You can’t perform that action at this time.
0 commit comments