Fixes #33785 for me

This commit is contained in:
Wez Furlong 2005-07-22 01:34:43 +00:00
parent 3db688c6c9
commit 3560bb9c2b
2 changed files with 6 additions and 3 deletions

View File

@ -227,6 +227,7 @@ static void get_lazy_object(pdo_stmt_t *stmt, zval *return_value TSRMLS_DC) /* {
Z_TYPE_P(return_value) = IS_OBJECT;
Z_OBJ_HANDLE_P(return_value) = Z_OBJ_HANDLE(stmt->lazy_object_ref);
Z_OBJ_HT_P(return_value) = Z_OBJ_HT(stmt->lazy_object_ref);
zend_objects_store_add_ref(return_value TSRMLS_CC);
}
/* }}} */

View File

@ -18,9 +18,11 @@ $db->exec("INSERT INTO test (id,name) VALUES(1,'test1')");
$db->exec("INSERT INTO test (id,name) VALUES(2,'test2')");
foreach ($db->query("SELECT * FROM test", PDO_FETCH_LAZY) as $v) {
echo $v->id.$v->name."\n";
echo "lazy: " . $v->id.$v->name."\n";
}
echo "End\n";
?>
--EXPECT--
1test1
2test2
lazy: 1test1
lazy: 2test2
End