Commit 17a4b7d1 authored by Jesse Norell's avatar Jesse Norell
Browse files

fix php warning in cron_plugin.php

parent 36cdb858
Pipeline #9152 passed with stage
in 10 minutes and 35 seconds
......@@ -184,12 +184,14 @@ class cron_plugin {
if(!$parent_domain) {
$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');
$tmp = unserialize($tmp);
if($tmp && isset($tmp['old'])) {
$this->parent_domain = $tmp['old'];
} else {
$app->log("Parent domain not found", LOGLEVEL_WARN);
return 0;
if(is_array($tmp) && isset($tmp['data']) && strlen($tmp['data']) > 0) {
$tmp = unserialize($tmp['data']);
if($tmp && isset($tmp['old'])) {
$this->parent_domain = $tmp['old'];
} else {
$app->log("Parent domain not found", LOGLEVEL_WARN);
return 0;
}
}
} else {
$this->parent_domain = $parent_domain;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment