xref: /PHP-8.0/ext/pdo_pgsql/tests/bug36727.phpt (revision a5527577)
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 __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
7require __DIR__ . '/config.inc';
8PDOTest::skip();
9?>
10--FILE--
11<?php
12require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
13require __DIR__ . '/config.inc';
14$db = PDOTest::test_factory(__DIR__ . '/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 %s on line %d
23bool(false)
24Done
25