File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2400,6 +2400,7 @@ static void pdo_row_free_storage(zend_object *std)
24002400 row -> stmt -> lazy_object_ref = NULL ;
24012401 OBJ_RELEASE (& row -> stmt -> std );
24022402 }
2403+ zend_object_std_dtor (std );
24032404}
24042405
24052406static zend_object * pdo_row_new (zend_class_entry * ce )
Original file line number Diff line number Diff line change 22GH-18114 (pdo lazy object crash)
33--EXTENSIONS--
44pdo_sqlite
5- --XLEAK--
6- See https://github.com/php/php-src/issues/18114#issuecomment-2738069692, will be fixed in a later PR on lower branches
75--FILE--
86<?php
97$ db = new PDO ('sqlite::memory: ' );
108$ x = $ db ->query ('select 1 as queryString ' );
11- foreach ($ x ->fetch (PDO ::FETCH_LAZY ) as $ entry ) {
9+ $ data = $ x ->fetch (PDO ::FETCH_LAZY );
10+ foreach ($ data as $ entry ) {
1211 var_dump ($ entry );
1312}
13+ var_dump ((array ) $ data );
1414echo "Done \n" ;
1515?>
1616--EXPECT--
17+ array(0) {
18+ }
1719Done
You can’t perform that action at this time.
0 commit comments