php-8.0.30-src/ext/pgsql/tests/bug72195.phpt

17 lines
366 B
PHP

--TEST--
Bug #72195 (pg_pconnect/pg_connect cause use-after-free)
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
$val = [];
try {
pg_pconnect($var1, "2", "3", "4");
} catch (ArgumentCountError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Warning: Undefined variable $var1 in %s on line %d
pg_pconnect() expects at most 2 arguments, 4 given