xref: /PHP-7.3/ext/pdo_pgsql/tests/bug36727.phpt (revision b746e698)
1--TEST--
2Bug #36727 (segfault in bindValue() when no parameters are defined)
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
6require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
7require dirname(__FILE__) . '/config.inc';
8PDOTest::skip();
9?>
10--FILE--
11<?php
12require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
13require dirname(__FILE__) . '/config.inc';
14$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
15
16$stmt = $db->prepare('SELECT * FROM child');
17var_dump($stmt->bindValue(':test', 1, PDO::PARAM_INT));
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: PDOStatement::bindValue(): SQLSTATE[HY093]: Invalid parameter number: :test in %sbug36727.php on line %d
23bool(false)
24Done
25