8000 [Cache][HttpFoundation][Lock] Fix empty username/password for PDO Pos… · symfony/symfony@534c34c · GitHub
[go: up one dir, main page]

Skip to content

Commit 534c34c

Browse files
HypeMCnicolas-grekas
authored andcommitted
[Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL
1 parent 58353d1 commit 534c34c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/Symfony/Component/Cache/Adapter/PdoAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface
3434
private $dataCol = 'item_data';
3535
private $lifetimeCol = 'item_lifetime';
3636
private $timeCol = 'item_time';
37-
private $username = '';
38-
private $password = '';
37+
private $username = null;
38+
private $password = null;
3939
private $connectionOptions = [];
4040
private $namespace;
4141

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ class PdoSessionHandler extends AbstractSessionHandler
112112
/**
113113
* Username when lazy-connect.
114114
*
115-
* @var string
115+
* @var string|null
116116
*/
117-
private $username = '';
117+
private $username = null;
118118

119119
/**
120120
* Password when lazy-connect.
121121
*
122-
* @var string
122+
* @var string|null
123123
*/
124-
private $password = '';
124+
private $password = null;
125125

126126
/**
127127
* Connection options when lazy-connect.

src/Symfony/Component/Lock/Store/PdoStore.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* Lock metadata are stored in a table. You can use createTable() to initialize
2626
* a correctly defined table.
27-
27+
*
2828
* CAUTION: This store relies on all client and server nodes to have
2929
* synchronized clocks for lock expiry to occur at the correct time.
3030
* To ensure locks don't expire prematurely; the TTLs should be set with enough
@@ -40,8 +40,8 @@ class PdoStore implements PersistingStoreInterface
4040
private $conn;
4141
private $dsn;
4242
private $driver;
43-
private $username = '';
44-
private $password = '';
43+
private $username = null;
44+
private $password = null;
4545
private $connectionOptions = [];
4646

4747
private $dbalStore;

src/Symfony/Component/Lock/Store/PostgreSqlStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class PostgreSqlStore implements BlockingSharedLockStoreInterface, BlockingStore
2929
{
3030
private $conn;
3131
private $dsn;
32-
private $username = '';
33-
private $password = '';
32+
private $username = null;
33+
private $password = null;
3434
private $connectionOptions = [];
3535
private static $storeRegistry = [];
3636

0 commit comments

Comments
 (0)
0