File tree 3 files changed +35
-3
lines changed 3 files changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ PHP NEWS
30
30
- SPL:
31
31
. Fixed bug #73423 (Reproducible crash with GDB backtrace). (Laruence)
32
32
33
+ - SQLite3:
34
+ . Fixed bug #73530 (Unsetting result set may reset other result set). (cmb)
35
+
33
36
- XML:
34
37
. Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
35
38
Original file line number Diff line number Diff line change @@ -2167,9 +2167,6 @@ static void php_sqlite3_result_object_free_storage(zend_object *object) /* {{{ *
2167
2167
}
2168
2168
2169
2169
if (!Z_ISNULL (intern -> stmt_obj_zval )) {
2170
- if (intern -> stmt_obj && intern -> stmt_obj -> initialised ) {
2171
- sqlite3_reset (intern -> stmt_obj -> stmt );
2172
- }
2173
2170
2174
2171
zval_ptr_dtor (& intern -> stmt_obj_zval );
2175
2172
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #73530 (Unsetting result set may reset other result set)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('sqlite3 ' )) die ('skip sqlite3 extension not available ' );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+ $ db = new SQLite3 (':memory: ' );
10
+ $ db ->exec ("CREATE TABLE foo (num int) " );
11
+ $ db ->exec ("INSERT INTO foo VALUES (0) " );
12
+ $ db ->exec ("INSERT INTO foo VALUES (1) " );
13
+ $ stmt = $ db ->prepare ("SELECT * FROM foo WHERE NUM = ? " );
14
+ $ stmt ->bindValue (1 , 0 , SQLITE3_INTEGER );
15
+ $ res1 = $ stmt ->execute ();
16
+ $ res1 ->finalize ();
17
+ $ stmt ->clear ();
18
+ $ stmt ->reset ();
19
+ $ stmt ->bindValue (1 , 1 , SQLITE3_INTEGER );
20
+ $ res2 = $ stmt ->execute ();
21
+ while ($ row = $ res2 ->fetchArray (SQLITE3_ASSOC )) {
22
+ var_dump ($ row );
23
+ unset($ res1 );
24
+ }
25
+ ?>
26
+ ===DONE===
27
+ --EXPECT--
28
+ array(1) {
29
+ ["num"]=>
30
+ int(1)
31
+ }
32
+ ===DONE===
You can’t perform that action at this time.
0 commit comments