diff --git a/NEWS b/NEWS index 93ac91e8cb4..379d0fac28e 100644 --- a/NEWS +++ b/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) diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index ced363bc62d..2c269fc337c 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -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; diff --git a/ext/sqlite3/tests/bug76665.phpt b/ext/sqlite3/tests/bug76665.phpt new file mode 100644 index 00000000000..0e1de136f73 --- /dev/null +++ b/ext/sqlite3/tests/bug76665.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle) +--SKIPIF-- + +--FILE-- +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===