From: Scott MacVicar Date: Mon, 28 Jul 2008 23:03:26 +0000 (+0000) Subject: MFB: Fix error when fetchArray reaches the last row X-Git-Tag: BEFORE_HEAD_NS_CHANGE~989 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a2163a439cc918a0e7abd22d4827aff47ad4f3b;p=php MFB: Fix error when fetchArray reaches the last row --- diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 3a302fb8c0..e5f6fb6bae 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -1281,9 +1281,11 @@ PHP_METHOD(sqlite3_result, fetchArray) add_u_assoc_zval(return_value, IS_UNICODE, ZSTR(ustr), data); } } - break; + break; + case SQLITE_DONE: RETURN_FALSE; + break; default: php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt)));