]> source.dussan.org Git - nextcloud-server.git/commitdiff
Reset opcache if update is detected 5017/head
authorMorris Jobke <hey@morrisjobke.de>
Sun, 21 May 2017 23:38:16 +0000 (18:38 -0500)
committerMorris Jobke <hey@morrisjobke.de>
Sun, 21 May 2017 23:40:53 +0000 (18:40 -0500)
This even works if opcache_reset is in the disabled_functions php.ini setting.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/base.php

index 38e9fb8e4984de8783abcdafe2d8f7233188d179..226aeeb727f059a2415a991884291dcde558edf7 100644 (file)
@@ -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();