From: Christoph M. Becker Date: Thu, 15 Aug 2019 11:29:39 +0000 (+0200) Subject: Unify ZPP handling in ext/sqlite3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3abbc092009fbc399c118a36d53549d18a6c08c;p=php Unify ZPP handling in ext/sqlite3 Since `zend_parse_parameters()` now throws on failure, it doesn't make sense anymore to use `zend_parse_parameters_throw()` instead, and also it's useless to set an explicit return value. --- diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index b968246f94..fa0d91bca4 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -109,7 +109,7 @@ PHP_METHOD(sqlite3, open) db_obj = Z_SQLITE3_DB_P(object); - if (FAILURE == zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) { return; } @@ -1088,7 +1088,7 @@ PHP_METHOD(sqlite3, createCollation) SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &collation_name, &collation_name_len, &callback_func) == FAILURE) { - RETURN_FALSE; + return; } if (!collation_name_len) { @@ -1867,7 +1867,7 @@ PHP_METHOD(sqlite3stmt, __construct) stmt_obj = Z_SQLITE3_STMT_P(object); - if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "OS", &db_zval, php_sqlite3_sc_entry, &sql) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OS", &db_zval, php_sqlite3_sc_entry, &sql) == FAILURE) { return; }