From 1652d9a237aef9214b305a006e405bce85c98807 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 5 Apr 2018 11:58:25 +0200 Subject: [PATCH] fetch all records from tblVersion if not, the database will be locked when e.g. droping a table --- install/update.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/update.php b/install/update.php index afc7e3e46..f8e91ee5a 100644 --- a/install/update.php +++ b/install/update.php @@ -61,7 +61,9 @@ if (!$db) { $errorMsg = ''; $res = $db->query('select * from tblVersion'); -if($rec = $res->fetch(PDO::FETCH_ASSOC)) { +$recs = $res->fetchAll(PDO::FETCH_ASSOC); +if(!empty($recs)) { + $rec = $recs[0]; if($_GET['version'] > $rec['major'].'.'.$rec['minor'].'.'.$rec['subminor']) { if(file_exists('update-'.$_GET['version'].'/'.$sqlfile)) {