diff --git a/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php b/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php index f88cbe9c0b4cdc20f6e653acd25ba2fbaccf6e3d..5a643a660a7a52db3596ec4a0312e6098e83f369 100644 --- a/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php +++ b/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php @@ -45,8 +45,8 @@ class z_php_fpm_incron_reload_plugin { function incronUpdate($eventName, $data) { global $app; - if ($data['new']['document_root'] === $data['old']['document_root']) { - $app->log('Document root unchanged. Not updating incron configuration.', LOGLEVEL_DEBUG); + if ($this->documentRootUnchanged($data) && $this->phpVersionUnchanged($data)) { + $app->log('Document root and PHP version unchanged. Not updating incron configuration.', LOGLEVEL_DEBUG); return; } @@ -59,6 +59,16 @@ class z_php_fpm_incron_reload_plugin { $this->teardown($data['old']); } + private function documentRootUnchanged($data) + { + return $data['new']['document_root'] === $data['old']['document_root']; + } + + private function phpVersionUnchanged($data) + { + return $data['new']['fastcgi_php_version'] === $data['old']['fastcgi_php_version']; + } + private function setup($data) { $triggerFile = $this->getTriggerFilePath($data['document_root']);