Simplified connection test

pull/9497/head
Michael 2020-11-07 09:58:20 +00:00
rodzic 8baac61212
commit d6a1a836f1
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -386,10 +386,11 @@ class Database
switch ($this->driver) {
case self::PDO:
$r = $this->p("SELECT 1");
if ($this->isResult($r)) {
$row = $this->toArray($r);
$connected = ($row[0]['1'] == '1');
}
$connected = $this->isResult($r);
// if ($this->isResult($r)) {
// $row = $this->toArray($r);
// $connected = ($row[0]['1'] == '1');
// }
break;
case self::MYSQLI:
$connected = $this->connection->ping();