You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ((!$this->options['validation']['method']['arguments_count_only'] ?? false)) {
124
+
if ($methodSignature === $convertedPassedArguments) {
125
+
$method = $methodReference;
126
+
break;
127
+
}
128
+
}
129
+
if (($this->options['validation']['method']['arguments_count_only'] ?? false) === true) {
130
+
$size = count($formattedArguments);
131
+
$passedArgumentsSize = count(
132
+
$arguments
133
+
);
134
+
135
+
if ($size === $passedArgumentsSize) {
136
+
$method = $methodReference;
137
+
break;
138
+
}
116
139
}
117
140
}
118
141
@@ -157,8 +180,11 @@ function ($argument) {
157
180
$mnemonicMap = newOpCode();
158
181
$executedCounter = 0;
159
182
while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) {
160
-
if (++$executedCounter > \PHPJava\Core\JVM\Parameters\Invoker::MAX_STACK_EXCEEDED) {
161
-
thrownewRuntimeException('Max stack exceeded. PHPJava has been stopped by safety guard. Maybe Java class has illegal program counter, stacks, or OpCode.');
183
+
if (++$executedCounter > ($this->options['max_stack_exceeded'] ?? \PHPJava\Core\JVM\Parameters\Invoker::MAX_STACK_EXCEEDED)) {
184
+
thrownewRuntimeException(
185
+
'Max stack exceeded. PHPJava has been stopped by safety guard.' .
186
+
' Maybe Java class has illegal program counter, stacks, or OpCode.'
0 commit comments