Skip to content

Commit

Permalink
split n'existe plus avec PHP 7
Browse files Browse the repository at this point in the history
Remplacé par preg_split qui existe de PHP4 à PHP7 au moins.

Corrige #243.
  • Loading branch information
gleu committed Aug 10, 2021
1 parent 50bbc5c commit c6473e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www-docs.postgresql.fr/tools/addrelease.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function usage() {
$pgpassfile = fopen($pgpassfilename, 'r');
$found = false;
while (!$found and $line = fgets($pgpassfile)) {
list($host, $port, $database, $user, $password) = split (":", trim($line), 5);
list($host, $port, $database, $user, $password) = preg_split ("/:/", trim($line), 5);
if ((!strcmp($PGHOST, $host) or !strcmp('*', $host)) and
(!strcmp($PGPORT, $port) or !strcmp('*', $port)) and
(!strcmp($PGDATABASE, $database) or !strcmp('*', $database)) and
Expand Down

0 comments on commit c6473e3

Please sign in to comment.