diff --git a/ext/pdo/tests/pdo_024.inc b/ext/pdo/tests/pdo_024.inc new file mode 100755 index 00000000000..60bb30a77c1 --- /dev/null +++ b/ext/pdo/tests/pdo_024.inc @@ -0,0 +1,21 @@ +query($SQL['create']); +$stmt = $DB->prepare($SQL['insert']); +$name = NULL; +$before_bind = $name; +$stmt->bindParam(':name', $name); +if ($name !== $before_bind) { + echo "bind: fail\n"; +} else { + echo "bind: success\n"; +} +var_dump($stmt->execute()); +var_dump($DB->query($SQL['select'])->fetchSingle()); +?> diff --git a/ext/pdo_mysql/tests/pdo_024.phpt b/ext/pdo_mysql/tests/pdo_024.phpt new file mode 100755 index 00000000000..bf14896fccf --- /dev/null +++ b/ext/pdo_mysql/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_MySQL: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE=== diff --git a/ext/pdo_pgsql/tests/pdo_024.phpt b/ext/pdo_pgsql/tests/pdo_024.phpt new file mode 100755 index 00000000000..634e0bca4f1 --- /dev/null +++ b/ext/pdo_pgsql/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_PGSQL: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE=== diff --git a/ext/pdo_sqlite/tests/pdo_024.phpt b/ext/pdo_sqlite/tests/pdo_024.phpt new file mode 100755 index 00000000000..15530419d74 --- /dev/null +++ b/ext/pdo_sqlite/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_SQLite: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE===