1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 09:04:02 +02:00

Avoid PDO exceptions in PHP 8

This commit is contained in:
Jakub Vrana
2020-12-06 13:50:13 +01:00
parent b0a217abdd
commit 0618429bce

View File

@@ -18,6 +18,7 @@ if (extension_loaded('pdo')) {
} catch (Exception $ex) { } catch (Exception $ex) {
auth_error(h($ex->getMessage())); auth_error(h($ex->getMessage()));
} }
$this->pdo->setAttribute(3, 1); // 3 - PDO::ATTR_ERRMODE, 1 - PDO::ERRMODE_WARNING
$this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS $this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
$this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION $this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
} }