Browse Source

Quit if database connection was lost during "e"

pull/5192/head
Michael 3 years ago
parent
commit
738644a006
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      include/dba.php

+ 7
- 0
include/dba.php View File

@ -598,6 +598,13 @@ class dba {
logger('DB Error '.self::$errorno.': '.self::$error."\n".
System::callstack(8)."\n".self::replaceParameters($sql, $params));
// On a lost connection we simply quit.
// A reconnect like in self::p could be dangerous with modifications
if ($errorno == 2006) {
logger('Giving up because of database error '.$errorno.': '.$error);
exit(1);
}
self::$error = $error;
self::$errorno = $errorno;
}


Loading…
Cancel
Save