Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 551cfac

Browse files
committed
cs
1 parent bdc03bc commit 551cfac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ private function buildDsnFromUrl(string $dsnOrUrl): string
489489
$dsn = null;
490490
switch ($driver) {
491491
case 'mysql':
492-
$dsn ='mysql:';
492+
$dsn = 'mysql:';
493493
if (isset($params['query']) && '' !== $params['query']) {
494494
$queryParams = [];
495495
parse_str($params['query'], $queryParams);
@@ -500,15 +500,16 @@ private function buildDsnFromUrl(string $dsnOrUrl): string
500500
if (isset($queryParams['unix_socket']) && '' !== $queryParams['unix_socket']) {
501501
$dsn .= 'unix_socket='.$queryParams['unix_socket'].';';
502502

503-
if (isset($params['path'])) {
503+
if (isset($params['path'])) {
504504
$dbName = substr($params['path'], 1); // Remove the leading slash
505505
$dsn .= 'dbname='.$dbName.';';
506-
}
506+
}
507507

508-
return $dsn;
508+
return $dsn;
509509
}
510510
}
511511
// If "unix_socket" is not in the query, we continue with the same process as pgsql
512+
// no break
512513
case 'pgsql':
513514
$dsn = $dsn ?? 'pgsql:';
514515

0 commit comments

Comments
 (0)