diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-05 16:32:23 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-05 16:33:19 +0200 |
commit | 8b3deb00b3af145a3a27af04b1332a804e7d8da4 (patch) | |
tree | 36c88de632189a3f5cf74a693c8ac7e5f866d858 | |
parent | 92b564a3b99f10abf20ec2ec43e54ea924a956d5 (diff) | |
download | nextcloud-server-8b3deb00b3af145a3a27af04b1332a804e7d8da4.tar.gz nextcloud-server-8b3deb00b3af145a3a27af04b1332a804e7d8da4.zip |
When we can not create the class, try if the variable is a registered service
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/private/AppFramework/Utility/SimpleContainer.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 8d5bceb0b87..889f17cbc6a 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -68,6 +68,9 @@ class SimpleContainer extends Container implements IContainer { // Service not found, use the default value when available if ($parameter->isDefaultValueAvailable()) { $parameters[] = $parameter->getDefaultValue(); + } else if ($parameterClass !== null) { + $resolveName = $parameter->getName(); + $parameters[] = $this->query($resolveName); } else { throw $e; } |