diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 3d49c23871ef998815603259fb55932ef16351e6..f3f5985e87bd6e0c4008b054461c77c4d5a8a671 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -52,7 +52,7 @@ class installer_base { } public function update_acme() { - $acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null')); + $acme = explode("\n", (string)shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null')); $acme = reset($acme); $val = 0; diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 46618e227898376e1e0c0a3826b1f34864de6129..57f264ec442a228311f83024e3515fccd4fa414b 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -1305,13 +1305,13 @@ class backup foreach ($domains as $rec) { $domain_id = $rec['domain_id']; $domain_backup_dir = $backup_dir . '/web' . $domain_id; + $web_path = $rec['document_root']; + $backup_download_dir = $web_path . '/backup'; // Remove backupdir symlink and create as directory instead if (is_link($backup_download_dir) || !is_dir($backup_download_dir)) { - $web_path = $rec['document_root']; $app->system->web_folder_protection($web_path, false); - $backup_download_dir = $web_path . '/backup'; if (is_link($backup_download_dir)) { unlink($backup_download_dir); } diff --git a/server/lib/classes/cron.d/200-ftplogfiles.inc.php b/server/lib/classes/cron.d/200-ftplogfiles.inc.php index a88a360ae2cb32ff99face8352686f43bf7a2a07..430d8ce412b7ad312fbe5b45df9d21dc26959a7c 100644 --- a/server/lib/classes/cron.d/200-ftplogfiles.inc.php +++ b/server/lib/classes/cron.d/200-ftplogfiles.inc.php @@ -70,7 +70,7 @@ class cronjob_ftplogfiles extends cronjob { function add_ftp_traffic(&$traffic_array, $parsed_line) { - if(is_array($traffic_array[$parsed_line['date']]) && array_key_exists($parsed_line['domain'], $traffic_array[$parsed_line['date']])) + if(isset($traffic_array[$parsed_line['date']]) && is_array($traffic_array[$parsed_line['date']]) && array_key_exists($parsed_line['domain'], $traffic_array[$parsed_line['date']])) { $traffic_array[$parsed_line['date']][$parsed_line['domain']][$parsed_line['direction']] += $parsed_line['size']; } @@ -89,13 +89,13 @@ class cronjob_ftplogfiles extends cronjob { while($line = fgets($fp)) { $parsed_line = parse_ftp_log($line); + if (!empty($parsed_line)) { + $sql = "SELECT wd.domain FROM ftp_user AS fu INNER JOIN web_domain AS wd ON fu.parent_domain_id = wd.domain_id WHERE fu.username = ? "; + $temp = $app->db->queryOneRecord($sql, $parsed_line['username'] ); + $parsed_line['domain'] = $temp['domain']; + add_ftp_traffic($ftp_traffic, $parsed_line); + } - $sql = "SELECT wd.domain FROM ftp_user AS fu INNER JOIN web_domain AS wd ON fu.parent_domain_id = wd.domain_id WHERE fu.username = ? "; - $temp = $app->db->queryOneRecord($sql, $parsed_line['username'] ); - - $parsed_line['domain'] = $temp['domain']; - - add_ftp_traffic($ftp_traffic, $parsed_line); } fclose($fp); diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 643f34e618708d728a75a03d58a3914fd551c810..15fe0626481faaf170b8f8f6c9e5bc41315a3f0b 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -393,7 +393,7 @@ class bind_plugin { //} //* Delete old domain file, if domain name has been changed - if($data['old']['origin'] != $data['new']['origin']) { + if(!empty($data['old']['origin']) && $data['old']['origin'] != $data['new']['origin']) { $filename = $dns_config['bind_zonefiles_dir'].'/' . $this->zone_file_prefix() . str_replace("/", "_", substr($data['old']['origin'], 0, -1)); if(is_file($filename)) unlink($filename);