Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix GH-20699: SQLite3Result fetchArray return array|false, null returned
This commit is contained in:
Niels Dossche committed 2025-12-14 23:17:58 +01:00
commit f3d5dd0feb
3 files changed
+19

No files matched your search

+4
View File
@@ -20,6 +20,10 @@ PHP NEWS
. Fixed bug GH-20678 (resource created by GlobIterator crashes with fclose()).
(David Carlier)
- Sqlite3:
. Fixed bug GH-20699 (SQLite3Result fetchArray return array|false,
null returned). (ndossche, plusminmax)
- Standard:
. Fix error check for proc_open() command. (ndossche)
+1
View File
@@ -1998,6 +1998,7 @@ PHP_METHOD(SQLite3Result, fetchArray)
default:
php_sqlite3_error(result_obj->db_obj, sqlite3_errcode(sqlite3_db_handle(result_obj->stmt_obj->stmt)), "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt)));
RETURN_FALSE;
}
}
/* }}} */
+14
View File
@@ -0,0 +1,14 @@
--TEST--
GH-20699 (SQLite3Result fetchArray return array|false, null returned)
--EXTENSIONS--
sqlite3
--CREDITS--
plusminmax
--FILE--
<?php
$db = new SQLite3(':memory:');
var_dump($db->prepare('BEGIN;')->execute()->fetchArray());
?>
--EXPECTF--
Warning: SQLite3Result::fetchArray(): Unable to execute statement: cannot start a transaction within a transaction in %s on line %d
bool(false)