Skip to content

Commit d0869c5

Browse files
author
Marius Burkard
committed
Merge branch '6208-cron_delete-php-warning' into 'develop'
Resolve "cron_delete php warning" Closes #6208 See merge request ispconfig/ispconfig3!1503
2 parents 48bac09 + 17a4b7d commit d0869c5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

server/plugins-available/cron_plugin.inc.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,14 @@ function delete($event_name, $data) {
184184

185185
if(!$parent_domain) {
186186
$tmp = $app->db->queryOneRecord('SELECT * FROM sys_datalog WHERE dbtable = ? AND dbidx = ? AND `action` = ? ORDER BY `datalog_id` DESC', 'web_domain', 'domain_id:' . $data['old']['parent_domain_id'], 'd');
187-
$tmp = unserialize($tmp);
188-
if($tmp && isset($tmp['old'])) {
189-
$this->parent_domain = $tmp['old'];
190-
} else {
191-
$app->log("Parent domain not found", LOGLEVEL_WARN);
192-
return 0;
187+
if(is_array($tmp) && isset($tmp['data']) && strlen($tmp['data']) > 0) {
188+
$tmp = unserialize($tmp['data']);
189+
if($tmp && isset($tmp['old'])) {
190+
$this->parent_domain = $tmp['old'];
191+
} else {
192+
$app->log("Parent domain not found", LOGLEVEL_WARN);
193+
return 0;
194+
}
193195
}
194196
} else {
195197
$this->parent_domain = $parent_domain;

0 commit comments

Comments
 (0)