mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
MINOR: fixed error msg retrival
This commit is contained in:
parent
7ad5ac0808
commit
97d4a15aa2
@ -362,7 +362,13 @@ class SQLite3Database extends SS_Database {
|
|||||||
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
|
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
|
||||||
if(self::$vacuum) {
|
if(self::$vacuum) {
|
||||||
$this->query('VACUUM', E_USER_NOTICE);
|
$this->query('VACUUM', E_USER_NOTICE);
|
||||||
if(preg_match('/authoriz/', $msg = $this->dbConn->lastErrorMsg())) {
|
if($this instanceof SQLitePDODatabase) {
|
||||||
|
$msg = $this->dbConn->errorInfo();
|
||||||
|
$msg = $msg[2];
|
||||||
|
} else {
|
||||||
|
$msg = $this->dbConn->lastErrorMsg();
|
||||||
|
}
|
||||||
|
if(preg_match('/authoriz/', $msg)) {
|
||||||
$this->alterationMessage('VACUUM | ' . $msg, "error");
|
$this->alterationMessage('VACUUM | ' . $msg, "error");
|
||||||
} else {
|
} else {
|
||||||
$this->alterationMessage("VACUUMing", "repaired");
|
$this->alterationMessage("VACUUMing", "repaired");
|
||||||
|
Loading…
Reference in New Issue
Block a user