avoid possible weird behaviour when resultset changes while running (if possible at all)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-05 08:43:28 +02:00
parent 2210d3de12
commit 941a25ec9d

View File

@@ -75,7 +75,8 @@ $result_tasks_stmt = Database::query("
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `id` = :id");
while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
$all_jobs = $result_tasks_stmt->fetchAll();
foreach ($all_jobs as $row) {
if ($row['data'] != '') {
$row['data'] = unserialize($row['data']);