File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -2373,6 +2373,7 @@ PHP_FUNCTION(odbc_next_result)
23732373 }
23742374 efree (result -> values );
23752375 result -> values = NULL ;
2376+ result -> numcols = 0 ;
23762377 }
23772378
23782379 result -> fetched = 0 ;
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Bug #46050 (odbc_next_result corrupts prepared resource)
3+ --SKIPIF--
4+ <?php include 'skipif.inc ' ; ?>
5+ --FILE--
6+ <?php
7+ include __DIR__ . "/config.inc " ;
8+ $ conn = odbc_connect ($ dsn , $ user , $ pass );
9+ $ stmt = odbc_prepare ($ conn , "SELECT 1 " );
10+ var_dump (odbc_execute ($ stmt ));
11+ var_dump (odbc_fetch_array ($ stmt ));
12+ var_dump (odbc_next_result ($ stmt ));
13+ var_dump (odbc_execute ($ stmt ));
14+ var_dump (odbc_fetch_array ($ stmt ));
15+ ?>
16+ --EXPECT--
17+ bool(true)
18+ array(1) {
19+ ["1"]=>
20+ string(1) "1"
21+ }
22+ bool(false)
23+ bool(true)
24+ array(1) {
25+ ["1"]=>
26+ string(1) "1"
27+ }
You can’t perform that action at this time.
0 commit comments