]> granicus.if.org Git - php/commitdiff
Unify ZPP handling in ext/sqlite3
authorChristoph M. Becker <cmbecker69@gmx.de>
Thu, 15 Aug 2019 11:29:39 +0000 (13:29 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 15 Aug 2019 11:31:02 +0000 (13:31 +0200)
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.

ext/sqlite3/sqlite3.c

index b968246f9409c952bc370748b385b037449f9481..fa0d91bca4043e024c414c52235b450958becfdf 100644 (file)
@@ -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;
        }