Skip to content

Commit

Permalink
MDL-49329 admin: Call opcache_reset() after installing new plugin code
Browse files Browse the repository at this point in the history
During the testing, I was experiencing weird behaviour - after a single
plugin updated was installed, I ended up on admin/index.php?cache=1. I
believe it was caused by the missing opcache_reset().
  • Loading branch information
mudrd8mz committed Oct 9, 2015
1 parent 8726c07 commit da54cf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/classes/plugin_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,16 @@ public function install_remote_plugins(array $plugins, $confirmed, $silent) {
if (!$this->unzip_plugin_file($zipfile, $target, $pluginname)) {
$silent or $this->mtrace(get_string('error'));
$silent or $this->mtrace('Unable to unzip '.$zipfile, PHP_EOL, DEBUG_DEVELOPER);
if (function_exists('opcache_reset')) {
opcache_reset();
}
return false;
}
$silent or $this->mtrace($ok);
}
if (function_exists('opcache_reset')) {
opcache_reset();
}

return true;
}
Expand Down

0 comments on commit da54cf1

Please sign in to comment.