mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 07:06:45 +02:00
Fix the uncaught exception because of namespace.
Signed-off-by: Takashi SHIRAI <shirai@nintendo.co.jp>
This commit is contained in:
committed by
Jakub Vrana
parent
2dd32cf534
commit
9f8344e53c
@@ -393,7 +393,7 @@ if (isset($_GET["sqlite"])) {
|
||||
}
|
||||
try {
|
||||
$link = new SqliteDb($db);
|
||||
} catch (Exception $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
$connection->error = $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ if (extension_loaded('pdo')) {
|
||||
$options[\PDO::ATTR_STATEMENT_CLASS] = array('Adminer\PdoDbStatement');
|
||||
try {
|
||||
$this->pdo = new \PDO($dsn, $username, $password, $options);
|
||||
} catch (Exception $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
auth_error(h($ex->getMessage()));
|
||||
}
|
||||
$this->server_info = @$this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION);
|
||||
|
@@ -25,7 +25,7 @@ if (isset($_GET["mongo"])) {
|
||||
function executeDbCommand($db, $command) {
|
||||
try {
|
||||
return $this->_link->executeCommand($db, new \MongoDB\Driver\Command($command));
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
return array();
|
||||
}
|
||||
@@ -36,7 +36,7 @@ if (isset($_GET["mongo"])) {
|
||||
$results = $this->_link->executeBulkWrite($namespace, $bulk);
|
||||
$this->affected_rows = $results->$counter();
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
return false;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ if (isset($_GET["mongo"])) {
|
||||
$skip = $page * $limit;
|
||||
try {
|
||||
return new Result($this->conn->_link->executeQuery($this->conn->_db_name . ".$table", new \MongoDB\Driver\Query($where, array('projection' => $select, 'limit' => $limit, 'skip' => $skip, 'sort' => $sort))));
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->conn->error = $e->getMessage();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user