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:
@@ -75,7 +75,8 @@ $result_tasks_stmt = Database::query("
|
|||||||
|
|
||||||
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `id` = :id");
|
$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'] != '') {
|
if ($row['data'] != '') {
|
||||||
$row['data'] = unserialize($row['data']);
|
$row['data'] = unserialize($row['data']);
|
||||||
|
|||||||
Reference in New Issue
Block a user