diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-09 12:31:00 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-09 12:31:00 +0200 |
| commit | 3ab88831ae46078a5ffeba50b9cf66386ae0db6a (patch) | |
| tree | 79397984d14e43656fe43579322af7545d00ab95 /ext/pgsql/tests | |
| parent | d37d2228353ff152245efde193f1fde0857ecaea (diff) | |
| download | php-git-3ab88831ae46078a5ffeba50b9cf66386ae0db6a.tar.gz | |
Remove deprecated multi-parameter form of pg_connect()
Diffstat (limited to 'ext/pgsql/tests')
| -rw-r--r-- | ext/pgsql/tests/bug72195.phpt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ext/pgsql/tests/bug72195.phpt b/ext/pgsql/tests/bug72195.phpt index 34735d31f4..0236a60feb 100644 --- a/ext/pgsql/tests/bug72195.phpt +++ b/ext/pgsql/tests/bug72195.phpt @@ -5,13 +5,12 @@ Bug #72195 (pg_pconnect/pg_connect cause use-after-free) --FILE-- <?php $val = []; -$var1 = $val; -printf("%x\n", count($val)); -@pg_pconnect($var1, "2", "3", "4"); -$var1 = ""; -tempnam(sys_get_temp_dir(), 'ABCDEFGHI'); -printf("%x\n", count($val)); +try { + pg_pconnect($var1, "2", "3", "4"); +} catch (ArgumentCountError $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECT-- -0 -0 +--EXPECTF-- +Warning: Undefined variable $var1 in %s on line %d +pg_pconnect() expects at most 2 arguments, 4 given |
