Skip to content

Commit 623291c

Browse files
[Lock][Process] Replace strtok calls
1 parent d63c92c commit 623291c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Store/DoctrineDbalPostgreSqlStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private function filterDsn(#[\SensitiveParameter] string $dsn): string
268268
}
269269

270270
[$scheme, $rest] = explode(':', $dsn, 2);
271-
$driver = strtok($scheme, '+');
271+
$driver = substr($scheme, 0, strpos($scheme, '+') ?: null);
272272
if (!\in_array($driver, ['pgsql', 'postgres', 'postgresql'])) {
273273
throw new InvalidArgumentException(\sprintf('The adapter "%s" does not support the "%s" driver.', __CLASS__, $driver));
274274
}

0 commit comments

Comments
 (0)