This commit is contained in:
2023-12-18 16:56:45 +08:00
parent 7d99a73c83
commit 950d23131e
+1 -1
View File
@@ -165,7 +165,7 @@ class Container implements ContainerInterface
throw new ReflectionException('Class ' . $className . ' cannot be instantiated');
}
if (($handler = $reflect->getConstructor()) !== null) {
if (($handler = $reflect->getConstructor()) !== null && empty($construct)) {
$construct = $this->getMethodParams($handler);
}
$newInstance = $reflect->newInstanceArgs($construct);