Browse Source

Merge pull request #13242 from cakephp/4.x-driver

Fix Driver PDO creation with getenv() return values.
Mark Story 7 years ago
parent
commit
1e5d1bb5af
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Database/Driver.php

+ 2 - 2
src/Database/Driver.php

@@ -90,8 +90,8 @@ abstract class Driver implements DriverInterface
     {
         $connection = new PDO(
             $dsn,
-            $config['username'],
-            $config['password'],
+            $config['username'] ?: null,
+            $config['password'] ?: null,
             $config['flags']
         );
         $this->setConnection($connection);