summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-09-09 12:31:00 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-09-09 12:31:00 +0200
commit3ab88831ae46078a5ffeba50b9cf66386ae0db6a (patch)
tree79397984d14e43656fe43579322af7545d00ab95 /ext/pgsql/tests
parentd37d2228353ff152245efde193f1fde0857ecaea (diff)
downloadphp-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.phpt17
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