async_data is NOT NULL, therefore we should not attempt to write a NULL, even if most MySQL servers dont complain

This commit is contained in:
Ralf Becker 2016-02-20 15:17:12 +00:00
parent c3a99d13a0
commit 27fc9a48d2

View File

@ -511,7 +511,8 @@ class asyncservice
}
else
{
$row['async_data'] = json_php_unserialize($row['async_data'], true); // allow non-serialized data
$row['async_data'] = !empty($row['async_data']) ?
json_php_unserialize($row['async_data'], true) : null; // allow non-serialized data
}
$jobs[$row['async_id']] = egw_db::strip_array_keys($row,'async_');
}
@ -539,7 +540,7 @@ class asyncservice
'async_next' => $job['next'],
'async_times' => json_encode($job['times']),
'async_method' => $job['method'],
'async_data' => $job['data'] ? json_encode($job['data']) : null,
'async_data' => $job['data'] ? json_encode($job['data']) : '',
'async_account_id'=> $job['account_id'],
);
$where['async_id'] = $job['id'];