Skip to content

Commit 83f7e9e

Browse files
committed
Correct the handling of the result of PDO fetch
1 parent ca496b8 commit 83f7e9e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ function addMaintenanceMode()
351351
$this->getConnection()
352352
->prepare("INSERT INTO {$table_name}(`item`,`editable`,`value`) VALUES (?,0,?)")
353353
->execute(array('update_in_progress', 1));
354-
}
355-
if ($result['update_in_progress'] == 0) {
354+
} elseif ($result['value'] == 0) {
356355
$this->getConnection()
357356
->prepare("UPDATE {$table_name} SET `value`=? WHERE `item`=?")
358357
->execute(array(1, 'update_in_progress'));

0 commit comments

Comments
 (0)