mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
Restore the connection check
This commit is contained in:
parent
1e52c430e6
commit
eb8caaa5e7
2 changed files with 8 additions and 9 deletions
|
@ -385,12 +385,11 @@ class Database
|
|||
|
||||
switch ($this->driver) {
|
||||
case self::PDO:
|
||||
$connected = true;
|
||||
// $r = $this->p("SELECT 1");
|
||||
// if ($this->isResult($r)) {
|
||||
// $row = $this->toArray($r);
|
||||
// $connected = ($row[0]['1'] == '1');
|
||||
// }
|
||||
$r = $this->p("SELECT 1");
|
||||
if ($this->isResult($r)) {
|
||||
$row = $this->toArray($r);
|
||||
$connected = ($row[0]['1'] == '1');
|
||||
}
|
||||
break;
|
||||
case self::MYSQLI:
|
||||
$connected = $this->connection->ping();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue