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