Skip to content

Commit 38a0f50

Browse files
authored
Fix sqlite3 fetchArray #64531
fix64531-sqlite3-fetchArray-skipNoColumns patch
1 parent 19222b8 commit 38a0f50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/sqlite3/sqlite3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,10 @@ PHP_METHOD(sqlite3result, fetchArray)
20282028
RETURN_THROWS();
20292029
}
20302030

2031+
if (sqlite3_column_count(result_obj->stmt_obj->stmt) == 0) {
2032+
return;
2033+
}
2034+
20312035
ret = sqlite3_step(result_obj->stmt_obj->stmt);
20322036
switch (ret) {
20332037
case SQLITE_ROW:

0 commit comments

Comments
 (0)