diff --git a/administrator/components/com_config/Model/ApplicationModel.php b/administrator/components/com_config/Model/ApplicationModel.php index 8540884c38ea5..43707544756ef 100644 --- a/administrator/components/com_config/Model/ApplicationModel.php +++ b/administrator/components/com_config/Model/ApplicationModel.php @@ -603,6 +603,12 @@ private function writeConfigFile(Registry $config) throw new \RuntimeException(Text::_('COM_CONFIG_ERROR_WRITE_FAILED')); } + // Invalidates the cached configuration file when opcache is in effect + if (function_exists('opcache_invalidate')) + { + opcache_invalidate($file); + } + // Attempt to make the file unwriteable if using FTP. if (!$ftp['enabled'] && Path::isOwner($file) && !Path::setPermissions($file, '0444')) {