Skip to content

Commit 9c56991

Browse files
committed
Pass constructor method to Routine::pass()
1 parent ae92215 commit 9c56991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/lang/reflection/Type.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function newInstance(... $args) {
204204
$constructor= $this->reflect->hasMethod('__construct');
205205
try {
206206
if ($constructor) {
207-
$pass= PHP_VERSION_ID < 80000 && $args ? Routine::pass($constructor, $args) : $args;
207+
$pass= PHP_VERSION_ID < 80000 && $args ? Routine::pass($this->reflect->getMethod('__construct'), $args) : $args;
208208
return $this->reflect->newInstanceArgs($pass);
209209
} else {
210210
return $this->reflect->newInstance();

0 commit comments

Comments
 (0)