aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php3
-rw-r--r--lib/public/AppFramework/App.php6
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 9110f43f288..200d5c078a8 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -100,6 +100,9 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
if ($parameter->allowsNull() && ($parameterType instanceof ReflectionNamedType)) {
return null;
}
+
+ // don't lose the error we got while trying to query by type
+ throw new QueryException($e->getMessage(), (int)$e->getCode(), $e);
}
}
diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php
index 6860de7c324..eec5c6e83e9 100644
--- a/lib/public/AppFramework/App.php
+++ b/lib/public/AppFramework/App.php
@@ -69,6 +69,12 @@ class App {
$step['args'][1] === $classNameParts[1]) {
$setUpViaQuery = true;
break;
+ } elseif (isset($step['class'], $step['function'], $step['args'][0]) &&
+ $step['class'] === \ReflectionClass::class &&
+ $step['function'] === 'initializeLazyObject' &&
+ $step['args'][0] === $this) {
+ $setUpViaQuery = true;
+ break;
}
}