xref: /PHP-8.2/ext/pdo_pgsql/tests/bug71573.phpt (revision 39131219)
1--TEST--
2Bug #71573 (Segfault (core dumped) if paramno beyond bound)
3--EXTENSIONS--
4pdo
5pdo_pgsql
6--SKIPIF--
7<?php
8require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
9require_once __DIR__ . '/config.inc';
10PDOTest::skip();
11?>
12--FILE--
13<?php
14require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
15require_once __DIR__ . '/config.inc';
16$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
17
18$statement = $db->prepare('select ?');
19$statement->execute([ 'test', 'test', 'test' ]);
20
21?>
22--EXPECTF--
23Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in %s on line %d
24