1--TEST-- 2Bug #62024 Cannot insert second row with null using parametrized query (Firebird PDO) 3--EXTENSIONS-- 4pdo_firebird 5--SKIPIF-- 6<?php require('skipif.inc'); ?> 7--XLEAK-- 8A bug in firebird causes a memory leak when calling `isc_attach_database()`. 9See https://github.com/FirebirdSQL/firebird/issues/7849 10--FILE-- 11<?php 12 13require("testdb.inc"); 14 15$dbh = getDbConnection(); 16$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 17$dbh->exec("CREATE TABLE test62024 (ID INTEGER NOT NULL, TEXT VARCHAR(10))"); 18 19//start actual test 20 21$sql = "insert into test62024 (id, text) values (?, ?)"; 22$sttmt = $dbh->prepare($sql); 23 24$args_ok = array(1, "test1"); 25$args_err = array(2, null); 26 27$res = $sttmt->execute($args_ok); 28var_dump($res); 29 30$res = $sttmt->execute($args_err); 31var_dump($res); 32 33 34//teardown test data 35$sttmt = $dbh->prepare('DELETE FROM test62024'); 36$sttmt->execute(); 37 38unset($sttmt); 39unset($dbh); 40 41?> 42--CLEAN-- 43<?php 44require 'testdb.inc'; 45$dbh = getDbConnection(); 46@$dbh->exec("DROP TABLE test62024"); 47unset($dbh); 48?> 49--EXPECT-- 50bool(true) 51bool(true) 52