diff options
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 |
