mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Merge branch 'PHP-7.2'
* PHP-7.2: Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
This commit is contained in:
4
NEWS
4
NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.0beta1
|
||||
|
||||
- SQLite3:
|
||||
. Fixed #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle).
|
||||
(cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #68553 (array_column: null values in $index_key become incrementing
|
||||
keys in result). (Laruence)
|
||||
|
||||
@@ -1591,7 +1591,7 @@ PHP_METHOD(sqlite3stmt, execute)
|
||||
break;
|
||||
|
||||
case SQLITE_FLOAT:
|
||||
/* convert_to_double(parameter);*/
|
||||
convert_to_double(parameter);
|
||||
sqlite3_bind_double(stmt_obj->stmt, param->param_number, Z_DVAL_P(parameter));
|
||||
break;
|
||||
|
||||
|
||||
19
ext/sqlite3/tests/bug76665.phpt
Normal file
19
ext/sqlite3/tests/bug76665.phpt
Normal file
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('sqlite3')) die('skip sqlite3 extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$db = new SQLite3(':memory:');
|
||||
$db->exec("CREATE TABLE foo (bar REAL)");
|
||||
$stmt = $db->prepare("INSERT INTO foo VALUES (:bar)");
|
||||
$stmt->bindValue(':bar', 17, SQLITE3_FLOAT);
|
||||
$stmt->execute();
|
||||
var_dump($db->querySingle("SELECT bar FROM foo LIMIT 1"));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
float(17)
|
||||
===DONE===
|
||||
Reference in New Issue
Block a user