Skip to content

Commit a3abbc0

Browse files
committed
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.
1 parent e3ebdb6 commit a3abbc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/sqlite3/sqlite3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ PHP_METHOD(sqlite3, open)
109109

110110
db_obj = Z_SQLITE3_DB_P(object);
111111

112-
if (FAILURE == zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
112+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
113113
return;
114114
}
115115

@@ -1088,7 +1088,7 @@ PHP_METHOD(sqlite3, createCollation)
10881088
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
10891089

10901090
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &collation_name, &collation_name_len, &callback_func) == FAILURE) {
1091-
RETURN_FALSE;
1091+
return;
10921092
}
10931093

10941094
if (!collation_name_len) {
@@ -1867,7 +1867,7 @@ PHP_METHOD(sqlite3stmt, __construct)
18671867

18681868
stmt_obj = Z_SQLITE3_STMT_P(object);
18691869

1870-
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "OS", &db_zval, php_sqlite3_sc_entry, &sql) == FAILURE) {
1870+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OS", &db_zval, php_sqlite3_sc_entry, &sql) == FAILURE) {
18711871
return;
18721872
}
18731873

0 commit comments

Comments
 (0)