From f25d0e6f4b0643b9fede7ca99e6aadaeebdb1f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Sun, 20 Sep 2026 15:28:38 +0200 Subject: [PATCH 1/3] fix: Correctly reset static vars of OCP\Util between requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/OC.php | 1 + lib/public/Util.php | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib/OC.php b/lib/OC.php index 5c58aee2091a8..b80e4fc0de4d8 100644 --- a/lib/OC.php +++ b/lib/OC.php @@ -1367,6 +1367,7 @@ private static function resetStaticProperties(): void { \OC_App::reset(); \OC_Helper::reset(); Filesystem::reset(); + \OCP\Util::resetStaticProperties(); } /** diff --git a/lib/public/Util.php b/lib/public/Util.php index 89604dbab1022..ad0a7e5322da2 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -33,6 +33,18 @@ class Util { /** @psalm-suppress ImpureStaticProperty */ private static ?bool $needUpgradeCache = null; + /** + * Reset static vars + * @since 36.0.0 + * @internal Only for internal use, may be removed at any point + */ + public static function resetStaticProperties(): void { + self::$scriptsInit = []; + self::$scripts = []; + self::$scriptDeps = []; + self::$needUpgradeCache = null; + } + /** * get the current installed version of Nextcloud * @return array From ab4d643d451093b3097386284dd5a88110484c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Sun, 20 Sep 2026 15:30:30 +0200 Subject: [PATCH 2/3] fix: Fix legacy files route with frankenphp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should not be used but just in case. Signed-off-by: Côme Chilliet --- lib/private/Route/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index b75c3e6982694..258afbfe1d20a 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -342,7 +342,7 @@ protected function includeLegacyFileRoute(array $parameters): void { unset($param['_route']); $_GET = array_merge($_GET, $param); unset($param); - require_once $parameters['file']; + require $parameters['file']; } /** From 65e5ff1940a507eb922b34d76d905b63968d1946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Sun, 20 Sep 2026 22:24:24 +0200 Subject: [PATCH 3/3] chore: Fix psalm issue about internal method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/OC.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/OC.php b/lib/OC.php index b80e4fc0de4d8..eeaf7c190cd4c 100644 --- a/lib/OC.php +++ b/lib/OC.php @@ -1367,6 +1367,7 @@ private static function resetStaticProperties(): void { \OC_App::reset(); \OC_Helper::reset(); Filesystem::reset(); + /** @psalm-suppress InternalMethod */ \OCP\Util::resetStaticProperties(); }