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 <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-05-21 18:38:16 -05:00
parent 6d9a6f03fb
commit 3c832f201f
1 changed files with 3 additions and 0 deletions

View File

@ -292,6 +292,9 @@ class OC {
*/ */
public static function checkUpgrade($showTemplate = true) { public static function checkUpgrade($showTemplate = true) {
if (\OCP\Util::needUpgrade()) { if (\OCP\Util::needUpgrade()) {
if (function_exists('opcache_reset')) {
opcache_reset();
}
$systemConfig = \OC::$server->getSystemConfig(); $systemConfig = \OC::$server->getSystemConfig();
if ($showTemplate && !$systemConfig->getValue('maintenance', false)) { if ($showTemplate && !$systemConfig->getValue('maintenance', false)) {
self::printUpgradePage(); self::printUpgradePage();