Files
php-src/ext/pgsql/tests/bug72195.phpt
KentarouTakeda c15988aab3 ext/pgsql: Refactor tests (#12608)
This makes the tests independent of each other and allows them to be run in parallel.

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2023-11-06 22:36:52 +00:00

19 lines
391 B
PHP

--TEST--
Bug #72195 (pg_pconnect/pg_connect cause use-after-free)
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("inc/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