Skip to content

Commit dd2bf58

Browse files
committed
Check if onInstall function exists in plugins.
1 parent 043a0a3 commit dd2bf58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ public function install_ispconfig()
875875
include_once($install_dir.'/server/plugins-available/'.$file);
876876
$plugin_name = substr($file,0,-8);
877877
$tmp = new $plugin_name;
878-
if($tmp->onInstall()) {
878+
if(method_exists($tmp,'onInstall') && $tmp->onInstall()) {
879879
if(!@is_link($install_dir.'/server/plugins-enabled/'.$file)) @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-enabled/'.$file);
880880
if (strpos($file, '_core_plugin') !== false) {
881881
if(!@is_link($install_dir.'/server/plugins-core/'.$file)) @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-core/'.$file);

0 commit comments

Comments
 (0)