diff options
author | Felipe Pena <felipe@php.net> | 2008-11-03 20:45:43 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-11-03 20:45:43 +0000 |
commit | d2edc09737a41ec0fc8b569ec7b349f8102c1830 (patch) | |
tree | d75a9b44f8ead55dc79de5b098b05aa51e36fb14 /ext/pdo_sqlite | |
parent | 23e04b542c586312d32204d94ece3c54e6633302 (diff) | |
download | php-git-d2edc09737a41ec0fc8b569ec7b349f8102c1830.tar.gz |
- Fixed endless loop in PDOStatement::debugDumpParams()
patch by: Jonah H. Harris <jonah.harris at gmail dot com>
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r-- | ext/pdo_sqlite/tests/debugdumpparams_001.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/tests/debugdumpparams_001.phpt b/ext/pdo_sqlite/tests/debugdumpparams_001.phpt new file mode 100644 index 0000000000..d85784a4f1 --- /dev/null +++ b/ext/pdo_sqlite/tests/debugdumpparams_001.phpt @@ -0,0 +1,31 @@ +--TEST-- +Testing PDOStatement::debugDumpParams() with bound params +--SKIPIF-- +<?php +if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; +?> +--FILE-- +<?php + +$db = new pdo('sqlite:memory'); + +$x= $db->prepare('select :a, :b'); +$x->bindValue(':a', 1, PDO::PARAM_INT); +$x->bindValue(':b', 'foo'); +var_dump($x->debugDumpParams()); + +?> +--EXPECT-- +SQL: [13] select :a, :b +Params: 2 +Key: Position #0: +paramno=-1 +name=[2] :a +is_param=1 +param_type=1 +Key: Position #0: +paramno=-1 +name=[2] :b +is_param=1 +param_type=2 +NULL |