Commit fda14ed0e92 for php
commit fda14ed0e92af6041b19ca192598476391ced66f
Merge: 67378677232 9c69d7c6a72
Author: David Carlier <devnexen@gmail.com>
Date: Sat Oct 31 13:01:59 2026 +0000
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Fix GH-25021: SQLite createFunction corrupts large integers
diff --cc ext/pdo_sqlite/tests/gh25021-udf.phpt
index 00000000000,3a5e94820af..ab7231c953b
mode 000000,100644..100644
--- a/ext/pdo_sqlite/tests/gh25021-udf.phpt
+++ b/ext/pdo_sqlite/tests/gh25021-udf.phpt
@@@ -1,0 -1,28 +1,29 @@@
+ --TEST--
+ GH-25021 (UDF isn't using sqlite3_*_int64 API)
+ --EXTENSIONS--
+ pdo_sqlite
+ --FILE--
+ <?php
+
+ $conn = new PDO('sqlite::memory:');
+
+ $conn->sqliteCreateFunction('my_udf_pass_int', static fn(int $v): int => $v);
+
+ foreach ([
+ 10,
+ PHP_INT_MIN,
+ PHP_INT_MAX,
+ ] as $v) {
+ $stmt = $conn->prepare('select my_udf_pass_int(:v)');
+ $stmt->bindValue(':v', $v, PDO::PARAM_INT);
+ $stmt->execute();
+ $result = $stmt->fetch();
+
+ var_dump($result[0] === $v);
+ }
+ ?>
---EXPECT--
++--EXPECTF--
++Deprecated: Method PDO::sqliteCreateFunction() is deprecated since 8.5, use Pdo\Sqlite::createFunction() instead in %s on line %d
+ bool(true)
+ bool(true)
+ bool(true)