diff options
| author | Felipe Pena <felipe@php.net> | 2010-07-29 23:46:49 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2010-07-29 23:46:49 +0000 |
| commit | 30a8dcff1b0d355dc08dd60b21d62781fb41f144 (patch) | |
| tree | 50a05f945d0505926607f6d74e88e27c97753063 /ext/pdo_sqlite/tests | |
| parent | e3ddef53b449a320132deb0e1e8cbf19ca77c248 (diff) | |
| download | php-git-30a8dcff1b0d355dc08dd60b21d62781fb41f144.tar.gz | |
- New test
Diffstat (limited to 'ext/pdo_sqlite/tests')
| -rw-r--r-- | ext/pdo_sqlite/tests/bug52487.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/tests/bug52487.phpt b/ext/pdo_sqlite/tests/bug52487.phpt new file mode 100644 index 0000000000..fc65bd3b60 --- /dev/null +++ b/ext/pdo_sqlite/tests/bug52487.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #52487 (PDO::FETCH_INTO leaks memory) +--SKIPIF-- +<?php # vim:ft=php +if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; +?> +--FILE-- +<?php +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); + +$stmt = $db->prepare("select 1 as attr"); +for ($i = 0; $i < 10; $i++) { + $stmt->setFetchMode(PDO::FETCH_INTO, new stdClass); +} + +print "ok\n"; + +?> +--EXPECT-- +ok |
