mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- New test
This commit is contained in:
parent
7b9fe96774
commit
938265115b
1 changed files with 21 additions and 0 deletions
21
ext/pdo_sqlite/tests/bug52487.phpt
Normal file
21
ext/pdo_sqlite/tests/bug52487.phpt
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue