FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix error reporting for invalid queries executed via pla by nico-abram · Pull Request #45 · phpLiteAdmin/pla · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .php  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 5 additions & 0 deletions classes/Database.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function __construct($data)
$this->db = new PDO("sqlite:".$this->data['path']);
if($this->db!=NULL)
{
if (version_compare(phpversion(), '8.0', '>=')) {
// Prior to PHP 8.0 this was the default, and we rely on it for error reporting
// See https://www.php.net/manual/en/pdo.error-handling.php
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
}
$this->type = "PDO";
break;
}
Expand Down

Back | FazBrowse Home | New Git URL