Commit 024ceaac authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(captive portal vouchers) missing busyTimeout (crashreport, PHP Warning: ...

(captive portal vouchers) missing busyTimeout (crashreport, PHP Warning:  SQLite3Stmt::execute(): Unable to execute statement: database is locked in /usr/local/opnsense/mvc/app/library/OPNsense/Auth/Voucher.php on line 120)

(cherry picked from commit 24ce2546)
parent 0e801c01
...@@ -70,6 +70,7 @@ class Voucher implements IAuthConnector ...@@ -70,6 +70,7 @@ class Voucher implements IAuthConnector
{ {
$db_path = '/conf/vouchers_' . $this->refid . '.db'; $db_path = '/conf/vouchers_' . $this->refid . '.db';
$this->dbHandle = new \SQLite3($db_path); $this->dbHandle = new \SQLite3($db_path);
$this->dbHandle->busyTimeout(2000);
$results = $this->dbHandle->query('select count(*) cnt from sqlite_master'); $results = $this->dbHandle->query('select count(*) cnt from sqlite_master');
$row = $results->fetchArray(); $row = $results->fetchArray();
if ($row['cnt'] == 0) { if ($row['cnt'] == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment