aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-06-16 12:01:16 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2025-06-16 12:01:16 +0200
commit4a1eb3dc2afa7946d7ad930535e1dc5a4db8a801 (patch)
tree7cf48f16eea8f76d231d2777d25d91680eba35d7
parentb3ffe4bf660a19d0af05640c007278c7131f4dae (diff)
downloadnextcloud-server-fix/fix-warning-lazy-ghost-application.tar.gz
nextcloud-server-fix/fix-warning-lazy-ghost-application.zip
fix: Correctly ignore lazy ghost initialization in debug warning about direct constructor callfix/fix-warning-lazy-ghost-application
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/public/AppFramework/App.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php
index eec5c6e83e9..2cf976ce90a 100644
--- a/lib/public/AppFramework/App.php
+++ b/lib/public/AppFramework/App.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
*/
namespace OCP\AppFramework;
+use OC\AppFramework\Utility\SimpleContainer;
use OC\ServerContainer;
use OCP\IConfig;
use OCP\Server;
@@ -70,9 +71,10 @@ class App {
$setUpViaQuery = true;
break;
} elseif (isset($step['class'], $step['function'], $step['args'][0]) &&
- $step['class'] === \ReflectionClass::class &&
- $step['function'] === 'initializeLazyObject' &&
+ $step['class'] === SimpleContainer::class &&
+ preg_match('/{closure:OC\\\\AppFramework\\\\Utility\\\\SimpleContainer::buildClass\\(\\):\\d+}/', $step['function']) &&
$step['args'][0] === $this) {
+ /* We are setup through a lazy ghost, fine */
$setUpViaQuery = true;
break;
}