mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Fixes #33785 for me
This commit is contained in:
parent
3db688c6c9
commit
3560bb9c2b
@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user