From 95c92d3428e51d50f5d949072387ffcb354ed6d1 Mon Sep 17 00:00:00 2001 From: "Eldad A. Fux" Date: Wed, 1 Nov 2023 23:42:19 -0400 Subject: [PATCH] Update DSN.php --- src/DSN/DSN.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DSN/DSN.php b/src/DSN/DSN.php index 1f59665..38a8a2b 100644 --- a/src/DSN/DSN.php +++ b/src/DSN/DSN.php @@ -64,7 +64,7 @@ public function __construct(string $dsn) $this->password = isset($parts['pass']) ? \urldecode($parts['pass']) : null; $this->host = $parts['host'] ?? ''; $this->port = $parts['port'] ?? null; - $this->path = isset($parts['path']) ? ltrim($parts['path'], '/') : ''; + $this->path = isset($parts['path']) ? ltrim((string)$parts['path'], '/') : ''; $this->query = $parts['query'] ?? null; }