From: Christoph M. Becker Date: Fri, 21 Feb 2020 12:38:29 +0000 (+0100) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e1ac7e968a62e7e7a02eef81ac06701842b141d;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix #79294: ::columnType() may fail after SQLite3Stmt::reset() --- 3e1ac7e968a62e7e7a02eef81ac06701842b141d diff --cc ext/sqlite3/php_sqlite3_structs.h index d86f39e431,3de8aac0d4..80e915da68 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@@ -108,7 -108,7 +108,6 @@@ struct _php_sqlite3_result_object zval stmt_obj_zval; int is_prepared_statement; - int complete; - int complete; // unused zend_object zo; }; diff --cc ext/sqlite3/sqlite3.c index 812758433d,3a3ade7bc3..0d5fc6de08 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@@ -2001,10 -1980,10 +2001,10 @@@ PHP_METHOD(sqlite3result, columnType SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &column) == FAILURE) { - return; + RETURN_THROWS(); } - if (result_obj->complete) { + if (!sqlite3_data_count(result_obj->stmt_obj->stmt)) { RETURN_FALSE; }