File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ PHP NEWS
67
67
- SPL:
68
68
. Fixed bug #71028 (Undefined index with ArrayIterator). (Laruence)
69
69
70
+ - SQLite3:
71
+ . Fixed bug #71049 (SQLite3Stmt::execute() releases bound parameter instead
72
+ of internal buffer). (Laruence)
73
+
70
74
- Standard:
71
75
. Fixed bug #70999 (php_random_bytes: called object is not a function).
72
76
(Scott)
Original file line number Diff line number Diff line change @@ -1536,8 +1536,7 @@ PHP_METHOD(sqlite3stmt, execute)
1536
1536
}
1537
1537
buffer = php_stream_copy_to_mem (stream , PHP_STREAM_COPY_ALL , 0 );
1538
1538
} else {
1539
- convert_to_string (parameter );
1540
- buffer = Z_STR_P (parameter );
1539
+ buffer = zval_get_string (parameter );
1541
1540
}
1542
1541
1543
1542
if (buffer ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #71049 (SQLite3Stmt::execute() releases bound parameter instead of internal buffer)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('sqlite3 ' )) die ('skip ' ); ?>
6
+ --FILE--
7
+ <?php
8
+
9
+ require (__DIR__ . '/new_db.inc ' );
10
+
11
+ $ db ->exec ('CREATE TABLE test (age INTEGER, id STRING) ' );
12
+
13
+ $ stmt = $ db ->prepare ("SELECT * FROM test WHERE id = ? ORDER BY id ASC " );
14
+ $ foo = "alive " . chr (33 );
15
+ $ stmt ->bindParam (1 , $ foo , SQLITE3_BLOB );
16
+ $ results = $ stmt ->execute ();
17
+ var_dump ($ foo );
18
+ $ db ->close ();
19
+ ?>
20
+ --EXPECT--
21
+ string(6) "alive!"
You can’t perform that action at this time.
0 commit comments