diff --git a/HeaderUtils.php b/HeaderUtils.php index f91c7e1d9..3456edace 100644 --- a/HeaderUtils.php +++ b/HeaderUtils.php @@ -256,7 +256,7 @@ public static function parseQuery(string $query, bool $ignoreBrackets = false, s private static function groupParts(array $matches, string $separators, bool $first = true): array { $separator = $separators[0]; - $separators = substr($separators, 1); + $separators = substr($separators, 1) ?: ''; $i = 0; if ('' === $separators && !$first) { diff --git a/Session/Storage/Handler/PdoSessionHandler.php b/Session/Storage/Handler/PdoSessionHandler.php index a40a7bc77..1e8f9c6c4 100644 --- a/Session/Storage/Handler/PdoSessionHandler.php +++ b/Session/Storage/Handler/PdoSessionHandler.php @@ -90,12 +90,12 @@ class PdoSessionHandler extends AbstractSessionHandler /** * Username when lazy-connect. */ - private string $username = ''; + private ?string $username = null; /** * Password when lazy-connect. */ - private string $password = ''; + private ?string $password = null; /** * Connection options when lazy-connect.