mirror of
https://github.com/nextcloud/server.git
synced 2024-07-29 20:15:55 +02:00
When we can not create the class, try if the variable is a registered service
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
92b564a3b9
commit
8b3deb00b3
@ -68,6 +68,9 @@ class SimpleContainer extends Container implements IContainer {
|
|||||||
// Service not found, use the default value when available
|
// Service not found, use the default value when available
|
||||||
if ($parameter->isDefaultValueAvailable()) {
|
if ($parameter->isDefaultValueAvailable()) {
|
||||||
$parameters[] = $parameter->getDefaultValue();
|
$parameters[] = $parameter->getDefaultValue();
|
||||||
|
} else if ($parameterClass !== null) {
|
||||||
|
$resolveName = $parameter->getName();
|
||||||
|
$parameters[] = $this->query($resolveName);
|
||||||
} else {
|
} else {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user