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