aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-04-29 17:32:15 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2025-06-05 20:50:42 +0200
commit98b2cfc4162115e7295f683d2810e53df93010b5 (patch)
tree0be23c2f75b6b369686a0c773b634432aa3ce6b1
parent86ff5810d71d93c31a2509b090ba7b881725d700 (diff)
downloadnextcloud-server-98b2cfc4162115e7295f683d2810e53df93010b5.tar.gz
nextcloud-server-98b2cfc4162115e7295f683d2810e53df93010b5.zip
fix: Fix several side effects of lazy ghosts
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-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;
}
}