Skip to content

Commit 61cf047

Browse files
authored
Merge pull request #55375 from nextcloud/fix/do-not-use-lazy-with-internal
fix: Do not try to create lazy ghosts for PHP internal classes
2 parents 953a1ed + d51efd9 commit 61cf047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/AppFramework/Utility/SimpleContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function buildClass(ReflectionClass $class): object {
6161
/* No constructor, return a instance directly */
6262
return $class->newInstance();
6363
}
64-
if (PHP_VERSION_ID >= 80400 && self::$useLazyObjects) {
64+
if (PHP_VERSION_ID >= 80400 && self::$useLazyObjects && !$class->isInternal()) {
6565
/* For PHP>=8.4, use a lazy ghost to delay constructor and dependency resolving */
6666
/** @psalm-suppress UndefinedMethod */
6767
return $class->newLazyGhost(function (object $object) use ($constructor): void {

0 commit comments

Comments
 (0)