From 3c832f201f71f869f849659a68979bf281e2fce7 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Sun, 21 May 2017 18:38:16 -0500 Subject: [PATCH] Reset opcache if update is detected This even works if opcache_reset is in the disabled_functions php.ini setting. Signed-off-by: Morris Jobke --- lib/base.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/base.php b/lib/base.php index 38e9fb8e498..226aeeb727f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -292,6 +292,9 @@ class OC { */ public static function checkUpgrade($showTemplate = true) { if (\OCP\Util::needUpgrade()) { + if (function_exists('opcache_reset')) { + opcache_reset(); + } $systemConfig = \OC::$server->getSystemConfig(); if ($showTemplate && !$systemConfig->getValue('maintenance', false)) { self::printUpgradePage(); -- 2.39.5