mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
fixed a postgresql-related bug, more database functions secured and add an exception for sqlite at installation
This commit is contained in:
parent
c129374147
commit
828d008bed
2 changed files with 20 additions and 8 deletions
|
@ -94,10 +94,14 @@ else if (isset($_POST['install'])) {
|
|||
$errors[] = 'Impossible to create the SQLite database file. Please check your file permissions.';
|
||||
}
|
||||
else {
|
||||
$db_path = 'sqlite:' . realpath('') . '/db/poche.sqlite';
|
||||
$handle = new PDO($db_path);
|
||||
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$sql_structure = "";
|
||||
try {
|
||||
$db_path = 'sqlite:' . realpath('') . '/db/poche.sqlite';
|
||||
$handle = new PDO($db_path);
|
||||
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$sql_structure = "";
|
||||
} catch (PDOException $e) {
|
||||
$errors[] = "SQLite has encountered an issue : " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// MySQL and Postgre
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue