DVL-002 Prevent HHVM from segfaulting during pg_connect

This commit is contained in:
cytopia 2017-04-20 15:36:05 +02:00
parent 567ba57a13
commit cb512b4ac4
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2

View File

@ -128,7 +128,8 @@ class Postgres
if ($database !== null) {
$link = pg_pconnect('host='.$host.' dbname='.$database.' user='.$user.' password='.$pass);
} else {
$link = pg_pconnect('host='.$host.' user='.$user.' password='.$pass);
// NOTE: using dbname=postgres prevents HHVM from segfaulting
$link = pg_pconnect('host='.$host.' dbname=postgres user='.$user.' password='.$pass);
}
error_reporting(-1);