diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-04-29 17:32:15 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-05 20:50:42 +0200 |
commit | 98b2cfc4162115e7295f683d2810e53df93010b5 (patch) | |
tree | 0be23c2f75b6b369686a0c773b634432aa3ce6b1 | |
parent | 86ff5810d71d93c31a2509b090ba7b881725d700 (diff) | |
download | nextcloud-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.php | 3 | ||||
-rw-r--r-- | lib/public/AppFramework/App.php | 6 |
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; } } |