Commit 58956315 authored by Jon Goodger's avatar Jon Goodger

Fix call on non-object in ping() with PDO wrapper

Fixes an issue when calling `ping()` where `$this->platform` is null. Happened to me because using the `'pdo'` param bypasses the `connect()` method and the platform is never set without explicitly calling the method.

Not sure if this is the most elegant way to deal with this but it worked enough for my purposes so I figured I should submit a PR.
parent 4ec16d06
......@@ -1590,7 +1590,7 @@ class Connection implements DriverConnection
}
try {
$this->query($this->platform->getDummySelectSQL());
$this->query($this->getDatabasePlatform()->getDummySelectSQL());
return true;
} catch (DBALException $e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment