xref: /PHP-5.4/ext/pdo_mysql/tests/bug_37445.phpt (revision 973d7bad)
1--TEST--
2PDO MySQL Bug #37445 (Premature stmt object destruction)
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
6require dirname(__FILE__) . '/config.inc';
7require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
8PDOTest::skip();
9?>
10--FILE--
11<?php
12require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
13$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
14
15$db->setAttribute(PDO :: ATTR_EMULATE_PREPARES, true);
16$stmt = $db->prepare("SELECT 1");
17$stmt->bindParam(':a', 'b');
18?>
19--EXPECTF--
20Fatal error: Cannot pass parameter 2 by reference in %sbug_37445.php on line %d
21