summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2019-12-31 11:27:02 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2019-12-31 11:46:11 +0100
commit345703724c633fb8c1b34e1299bf3375f000c398 (patch)
tree18da0e12163e82ce16fbee726df1839439a1edfa
parentd9ac1ca8de298baf10f7c713c0b37c6ea5d89cf4 (diff)
downloadphp-git-345703724c633fb8c1b34e1299bf3375f000c398.tar.gz
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
-rw-r--r--ext/iconv/iconv.c24
-rw-r--r--ext/imap/php_imap.c132
-rw-r--r--ext/intl/ERROR_CONVENTIONS.md2
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.cpp2
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.cpp24
-rw-r--r--ext/intl/breakiterator/codepointiterator_methods.cpp2
-rw-r--r--ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp10
-rw-r--r--ext/intl/calendar/calendar_methods.cpp10
-rw-r--r--ext/intl/calendar/gregoriancalendar_methods.cpp4
-rw-r--r--ext/intl/common/common_enum.cpp10
-rw-r--r--ext/intl/common/common_error.c8
-rw-r--r--ext/intl/converter/converter.c8
-rw-r--r--ext/intl/dateformat/dateformat_format_object.cpp2
-rw-r--r--ext/intl/grapheme/grapheme_string.c16
-rw-r--r--ext/intl/idn/idn.c2
-rw-r--r--ext/intl/locale/locale_methods.c22
-rw-r--r--ext/intl/msgformat/msgformat_parse.c2
-rw-r--r--ext/intl/normalizer/normalizer_normalize.c2
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c2
-rw-r--r--ext/intl/spoofchecker/spoofchecker_create.c2
-rw-r--r--ext/intl/spoofchecker/spoofchecker_main.c10
-rw-r--r--ext/intl/timezone/timezone_methods.cpp26
-rw-r--r--ext/intl/transliterator/transliterator_methods.c10
-rw-r--r--ext/intl/uchar/uchar.c44
-rw-r--r--ext/json/json.c4
-rw-r--r--ext/ldap/ldap.c88
-rw-r--r--ext/libxml/libxml.c6
-rw-r--r--ext/mbstring/mbstring.c76
-rw-r--r--ext/mbstring/php_mbregex.c24
-rw-r--r--ext/mysqli/mysqli.c8
-rw-r--r--ext/mysqli/mysqli_api.c12
-rw-r--r--ext/mysqli/mysqli_nonapi.c12
-rw-r--r--ext/mysqli/mysqli_report.c2
-rw-r--r--ext/mysqli/mysqli_warning.c2
-rw-r--r--ext/oci8/oci8_interface.c104
-rw-r--r--ext/odbc/php_odbc.c80
-rw-r--r--ext/opcache/zend_accelerator_module.c12
-rw-r--r--ext/openssl/openssl.c125
-rw-r--r--ext/pcntl/pcntl.c46
-rw-r--r--ext/pdo/pdo.c2
-rw-r--r--ext/pdo/pdo_dbh.c18
-rw-r--r--ext/pdo/pdo_stmt.c6
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c14
-rw-r--r--ext/pgsql/pgsql.c134
-rw-r--r--ext/phar/func_interceptors.c4
-rw-r--r--ext/phar/phar_object.c136
-rw-r--r--ext/posix/posix.c2
-rw-r--r--ext/pspell/pspell.c34
-rw-r--r--ext/readline/readline.c26
-rw-r--r--ext/session/mod_user_class.c16
-rw-r--r--ext/session/session.c42
-rw-r--r--ext/shmop/shmop.c12
-rw-r--r--ext/simplexml/simplexml.c32
-rw-r--r--ext/simplexml/sxe.c14
-rw-r--r--ext/snmp/snmp.c40
-rw-r--r--ext/soap/soap.c28
-rw-r--r--ext/sockets/sendrecvmsg.c6
-rw-r--r--ext/sockets/sockets.c68
-rw-r--r--ext/sqlite3/sqlite3.c74
-rw-r--r--ext/sysvmsg/sysvmsg.c14
-rw-r--r--ext/sysvsem/sysvsem.c8
-rw-r--r--ext/sysvshm/sysvshm.c14
-rw-r--r--ext/tidy/tidy.c20
-rw-r--r--ext/xml/xml.c42
-rw-r--r--ext/xmlreader/php_xmlreader.c36
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c28
-rw-r--r--ext/xmlwriter/php_xmlwriter.c4
-rw-r--r--ext/xsl/xsltprocessor.c14
-rw-r--r--ext/zend_test/test.c8
-rw-r--r--ext/zip/php_zip.c94
-rw-r--r--ext/zlib/zlib.c28
71 files changed, 1001 insertions, 994 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 9e4c52d252..5f05602573 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2002,7 +2002,7 @@ PHP_FUNCTION(iconv_strlen)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|s",
&str, &charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2037,7 +2037,7 @@ PHP_FUNCTION(iconv_substr)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sl|l!s",
&str, &offset, &length, &len_is_null,
&charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2077,7 +2077,7 @@ PHP_FUNCTION(iconv_strpos)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|ls",
&haystk, &ndl,
&offset, &charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2131,7 +2131,7 @@ PHP_FUNCTION(iconv_strrpos)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|s",
&haystk, &ndl,
&charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(ndl) < 1) {
@@ -2176,7 +2176,7 @@ PHP_FUNCTION(iconv_mime_encode)
&field_name, &field_value,
&pref) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (pref != NULL) {
@@ -2274,7 +2274,7 @@ PHP_FUNCTION(iconv_mime_decode)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ls",
&encoded_str, &mode, &charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2314,7 +2314,7 @@ PHP_FUNCTION(iconv_mime_decode_headers)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ls",
&encoded_str, &mode, &charset, &charset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2407,8 +2407,9 @@ PHP_NAMED_FUNCTION(php_if_iconv)
zend_string *out_buffer;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssS",
- &in_charset, &in_charset_len, &out_charset, &out_charset_len, &in_buffer) == FAILURE)
- return;
+ &in_charset, &in_charset_len, &out_charset, &out_charset_len, &in_buffer) == FAILURE) {
+ RETURN_THROWS();
+ }
if (in_charset_len >= ICONV_CSNMAXLEN || out_charset_len >= ICONV_CSNMAXLEN) {
php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
@@ -2473,8 +2474,9 @@ PHP_FUNCTION(iconv_get_encoding)
char *type = "all";
size_t type_len = sizeof("all")-1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &type, &type_len) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &type, &type_len) == FAILURE) {
+ RETURN_THROWS();
+ }
if (!strcasecmp("all", type)) {
array_init(return_value);
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 920ae744b6..ec23bda52b 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -808,7 +808,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (zend_parse_parameters(argc, "PSS|lla", &mailbox, &user,
&passwd, &flags, &retries, &params) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc >= 4) {
@@ -926,7 +926,7 @@ PHP_FUNCTION(imap_reopen)
long cl_flags=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS|ll", &streamind, &mailbox, &options, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -971,7 +971,7 @@ PHP_FUNCTION(imap_append)
STRING st;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|SS", &streamind, &folder, &message, &flags, &internal_date) == FAILURE) {
- return;
+ RETURN_THROWS();
}
@@ -1019,7 +1019,7 @@ PHP_FUNCTION(imap_num_msg)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1038,7 +1038,7 @@ PHP_FUNCTION(imap_ping)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1057,7 +1057,7 @@ PHP_FUNCTION(imap_num_recent)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1078,7 +1078,7 @@ PHP_FUNCTION(imap_get_quota)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &qroot) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1107,7 +1107,7 @@ PHP_FUNCTION(imap_get_quotaroot)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &mbox) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1138,7 +1138,7 @@ PHP_FUNCTION(imap_set_quota)
STRINGLIST limits;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSl", &streamind, &qroot, &mailbox_size) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1162,7 +1162,7 @@ PHP_FUNCTION(imap_setacl)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSSS", &streamind, &mailbox, &id, &rights) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1182,7 +1182,7 @@ PHP_FUNCTION(imap_getacl)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &mailbox) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1215,7 +1215,7 @@ PHP_FUNCTION(imap_expunge)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1237,7 +1237,7 @@ PHP_FUNCTION(imap_gc)
zend_long flags;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &streamind, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) {
@@ -1265,7 +1265,7 @@ PHP_FUNCTION(imap_close)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "r|l", &streamind, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1307,7 +1307,7 @@ PHP_FUNCTION(imap_headers)
char tmp[MAILTMPLEN];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1359,7 +1359,7 @@ PHP_FUNCTION(imap_body)
unsigned long body_len = 0;
if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
@@ -1404,7 +1404,7 @@ PHP_FUNCTION(imap_mail_copy)
pils *imap_le_struct;
if (zend_parse_parameters(argc, "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1430,7 +1430,7 @@ PHP_FUNCTION(imap_mail_move)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1454,7 +1454,7 @@ PHP_FUNCTION(imap_createmailbox)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &folder) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1478,7 +1478,7 @@ PHP_FUNCTION(imap_renamemailbox)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &old_mailbox, &new_mailbox) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1502,7 +1502,7 @@ PHP_FUNCTION(imap_deletemailbox)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &folder) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1527,7 +1527,7 @@ PHP_FUNCTION(imap_list)
STRINGLIST *cur=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1567,7 +1567,7 @@ PHP_FUNCTION(imap_getmailboxes)
char *delim=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1616,7 +1616,7 @@ PHP_FUNCTION(imap_listscan)
STRINGLIST *cur=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSSS", &streamind, &ref, &pat, &content) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1650,7 +1650,7 @@ PHP_FUNCTION(imap_check)
char date[100];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1685,7 +1685,7 @@ PHP_FUNCTION(imap_delete)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rz|l", &streamind, &sequence, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1711,7 +1711,7 @@ PHP_FUNCTION(imap_undelete)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rz|l", &streamind, &sequence, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1741,7 +1741,7 @@ PHP_FUNCTION(imap_headerinfo)
char dummy[2000], fulladdress[MAILTMPLEN + 1];
if (zend_parse_parameters(argc, "rl|llS", &streamind, &msgno, &fromlength, &subjectlength, &defaulthost) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1821,7 +1821,7 @@ PHP_FUNCTION(imap_rfc822_parse_headers)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "S|S", &headers, &defaulthost) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc == 2) {
@@ -1848,7 +1848,7 @@ PHP_FUNCTION(imap_lsub)
STRINGLIST *cur=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1887,7 +1887,7 @@ PHP_FUNCTION(imap_getsubscribed)
char *delim=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1935,7 +1935,7 @@ PHP_FUNCTION(imap_subscribe)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &folder) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1959,7 +1959,7 @@ PHP_FUNCTION(imap_unsubscribe)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &folder) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -1985,7 +1985,7 @@ PHP_FUNCTION(imap_fetchstructure)
int msgindex, argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~FT_UID) != 0)) {
@@ -2037,7 +2037,7 @@ PHP_FUNCTION(imap_fetchbody)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
@@ -2079,7 +2079,7 @@ PHP_FUNCTION(imap_fetchmime)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
@@ -2119,7 +2119,7 @@ PHP_FUNCTION(imap_savebody)
zend_long msgno, flags = 0;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rzl|Sl", &stream, &out, &msgno, &section, &flags)) {
- return;
+ RETURN_THROWS();
}
if ((imap_ptr = (pils *)zend_fetch_resource(Z_RES_P(stream), "imap", le_imap)) == NULL) {
@@ -2173,7 +2173,7 @@ PHP_FUNCTION(imap_base64)
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
- return;
+ RETURN_THROWS();
}
decode = (char *) rfc822_base64((unsigned char *) ZSTR_VAL(text), ZSTR_LEN(text), &newlength);
@@ -2196,7 +2196,7 @@ PHP_FUNCTION(imap_qprint)
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
- return;
+ RETURN_THROWS();
}
decode = (char *) rfc822_qprint((unsigned char *) ZSTR_VAL(text), ZSTR_LEN(text), &newlength);
@@ -2219,7 +2219,7 @@ PHP_FUNCTION(imap_8bit)
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
- return;
+ RETURN_THROWS();
}
decode = (char *) rfc822_8bit((unsigned char *) ZSTR_VAL(text), ZSTR_LEN(text), &newlength);
@@ -2242,7 +2242,7 @@ PHP_FUNCTION(imap_binary)
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
- return;
+ RETURN_THROWS();
}
decode = (char*)rfc822_binary(ZSTR_VAL(text), ZSTR_LEN(text), &newlength);
@@ -2267,7 +2267,7 @@ PHP_FUNCTION(imap_mailboxmsginfo)
zend_ulong unreadmsg = 0, deletedmsg = 0, msize = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2311,7 +2311,7 @@ PHP_FUNCTION(imap_rfc822_write_address)
zend_string *string;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SSS", &mailbox, &host, &personal) == FAILURE) {
- return;
+ RETURN_THROWS();
}
addr=mail_newaddr();
@@ -2352,7 +2352,7 @@ PHP_FUNCTION(imap_rfc822_parse_adrlist)
ENVELOPE *env;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &str, &defaulthost) == FAILURE) {
- return;
+ RETURN_THROWS();
}
env = mail_newenvelope();
@@ -2395,7 +2395,7 @@ PHP_FUNCTION(imap_utf8)
SIZEDTEXT src, dest;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
src.data = NULL;
@@ -2459,7 +2459,7 @@ PHP_FUNCTION(imap_utf7_decode)
} state;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
in = (const unsigned char *) ZSTR_VAL(arg);
@@ -2598,7 +2598,7 @@ PHP_FUNCTION(imap_utf7_encode)
} state;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
in = (const unsigned char *) ZSTR_VAL(arg);
@@ -2702,7 +2702,7 @@ static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
unsigned char *out;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &in) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(in) < 1) {
@@ -2750,7 +2750,7 @@ PHP_FUNCTION(imap_setflag_full)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|l", &streamind, &sequence, &flag, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2773,7 +2773,7 @@ PHP_FUNCTION(imap_clearflag_full)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rSS|l", &streamind, &sequence, &flag, &flags) ==FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2800,7 +2800,7 @@ PHP_FUNCTION(imap_sort)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rll|lSS", &streamind, &pgm, &rev, &flags, &criteria, &charset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2856,7 +2856,7 @@ PHP_FUNCTION(imap_fetchheader)
int msgindex, argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) {
@@ -2893,7 +2893,7 @@ PHP_FUNCTION(imap_uid)
int msgindex;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &streamind, &msgno) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2919,7 +2919,7 @@ PHP_FUNCTION(imap_msgno)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &streamind, &msgno) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2940,7 +2940,7 @@ PHP_FUNCTION(imap_status)
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSl", &streamind, &mbx, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -2985,7 +2985,7 @@ PHP_FUNCTION(imap_bodystruct)
BODY *body;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlS", &streamind, &msg, &section) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -3098,7 +3098,7 @@ PHP_FUNCTION(imap_fetch_overview)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rS|l", &streamind, &sequence, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags && ((flags & ~FT_UID) != 0)) {
@@ -3188,7 +3188,7 @@ PHP_FUNCTION(imap_mail_compose)
int first;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "aa", &envelope, &body) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#define PHP_RFC822_PARSE_ADRLIST(target, value) \
@@ -3738,7 +3738,7 @@ PHP_FUNCTION(imap_mail)
if (zend_parse_parameters(argc, "SSS|SSSS", &to, &subject, &message,
&headers, &cc, &bcc, &rpath) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* To: */
@@ -3782,7 +3782,7 @@ PHP_FUNCTION(imap_search)
SEARCHPGM *pgm = NIL;
if (zend_parse_parameters(argc, "rS|lS", &streamind, &criteria, &flags, &charset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -3825,7 +3825,7 @@ PHP_FUNCTION(imap_alerts)
STRINGLIST *cur=NIL;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (IMAPG(imap_alertstack) == NIL) {
@@ -3852,7 +3852,7 @@ PHP_FUNCTION(imap_errors)
ERRORLIST *cur=NIL;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (IMAPG(imap_errorstack) == NIL) {
@@ -3879,7 +3879,7 @@ PHP_FUNCTION(imap_last_error)
ERRORLIST *cur=NIL;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (IMAPG(imap_errorstack) == NIL) {
@@ -3908,7 +3908,7 @@ PHP_FUNCTION(imap_mime_header_decode)
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -4385,7 +4385,7 @@ PHP_FUNCTION(imap_thread)
SEARCHPGM *pgm = NIL;
if (zend_parse_parameters(argc, "r|l", &streamind, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
@@ -4420,7 +4420,7 @@ PHP_FUNCTION(imap_timeout)
int timeout_type;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &ttype, &timeout) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (timeout == -1) {
diff --git a/ext/intl/ERROR_CONVENTIONS.md b/ext/intl/ERROR_CONVENTIONS.md
index 863b9f1b8d..af2450c818 100644
--- a/ext/intl/ERROR_CONVENTIONS.md
+++ b/ext/intl/ERROR_CONVENTIONS.md
@@ -114,7 +114,7 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
&text, &text_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_set_text: bad arguments", 0);
- RETURN_FALSE;
+ RETURN_THROWS();
}
/* ... */
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp
index af36f3d59e..cd3ef42281 100644
--- a/ext/intl/breakiterator/breakiterator_iterators.cpp
+++ b/ext/intl/breakiterator/breakiterator_iterators.cpp
@@ -276,7 +276,7 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp
index 25cd03eeb5..3f2dded5ef 100644
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -53,7 +53,7 @@ static void _breakiter_factory(const char *func_name,
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!",
&locale_str, &dummy) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (locale_str == NULL) {
@@ -113,7 +113,7 @@ U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
CodePointBreakIterator *cpbi = new CodePointBreakIterator();
@@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -146,7 +146,7 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -178,7 +178,7 @@ static void _breakiter_no_args_ret_int32(
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -199,7 +199,7 @@ static void _breakiter_int32_ret_int32(
object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -273,7 +273,7 @@ U_CFUNC PHP_FUNCTION(breakiter_current)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -305,7 +305,7 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l",
&offset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (offset < INT32_MIN || offset > INT32_MAX) {
@@ -329,7 +329,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_locale)
object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &locale_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
@@ -355,7 +355,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &key_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (key_type != PARTS_ITERATOR_KEY_SEQUENTIAL
@@ -378,7 +378,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Fetch the object (without resetting its last error code ). */
@@ -396,7 +396,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
diff --git a/ext/intl/breakiterator/codepointiterator_methods.cpp b/ext/intl/breakiterator/codepointiterator_methods.cpp
index eba0c9e8a3..12df794925 100644
--- a/ext/intl/breakiterator/codepointiterator_methods.cpp
+++ b/ext/intl/breakiterator/codepointiterator_methods.cpp
@@ -31,7 +31,7 @@ U_CFUNC PHP_FUNCTION(cpbi_get_last_code_point)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
index f90766206e..04031733d9 100644
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -41,7 +41,7 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b",
&rules, &rules_len, &compiled) == FAILURE) {
- return;
+ RETURN_THROWS();
}
// instantiation of ICU object
@@ -101,7 +101,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rules)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -140,7 +140,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
@@ -178,7 +178,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules)
object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
BREAKITER_METHOD_FETCH_OBJECT;
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index 50b4f6982d..76a50e0a10 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -61,7 +61,7 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zs!",
&zv_timezone, &locale_str, &dummy) == FAILURE) {
- return;
+ RETURN_THROWS();
}
timeZone = timezone_process_timezone_argument(zv_timezone, NULL,
@@ -150,7 +150,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb",
&key, &key_len, &locale, &locale_len, &commonly_used) == FAILURE) {
- return;
+ RETURN_THROWS();
}
//does not work; see ICU bug 9194
@@ -184,7 +184,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_now)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_DOUBLE((double)Calendar::getNow());
@@ -195,7 +195,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_available_locales)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
int32_t count;
@@ -1049,7 +1049,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s!",
&zv_arg, &locale_str, &locale_str_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function(
diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp
index 4c022c9473..f258e2661a 100644
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -75,13 +75,13 @@ static void _php_intlgregcal_constructor_body(
if (variant <= 2) {
if (zend_parse_parameters(MIN(ZEND_NUM_ARGS(), 2),
"|z!s!", &tz_object, &locale, &locale_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
if (variant > 2 && zend_parse_parameters(ZEND_NUM_ARGS(),
"lll|lll", &largs[0], &largs[1], &largs[2], &largs[3], &largs[4],
&largs[5]) == FAILURE) {
- return;
+ RETURN_THROWS();
}
// instantion of ICU object
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index 7367e3ad70..d94323ba82 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -209,7 +209,7 @@ static PHP_METHOD(IntlIterator, current)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
@@ -224,7 +224,7 @@ static PHP_METHOD(IntlIterator, key)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
@@ -241,7 +241,7 @@ static PHP_METHOD(IntlIterator, next)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
@@ -256,7 +256,7 @@ static PHP_METHOD(IntlIterator, rewind)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
@@ -273,7 +273,7 @@ static PHP_METHOD(IntlIterator, valid)
INTLITERATOR_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
INTLITERATOR_METHOD_FETCH_OBJECT;
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index 883c45f5fe..af239d6e2c 100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
@@ -27,7 +27,7 @@
PHP_FUNCTION( intl_get_error_code )
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG( intl_error_get_code( NULL ) );
@@ -40,7 +40,7 @@ PHP_FUNCTION( intl_get_error_code )
PHP_FUNCTION( intl_get_error_message )
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STR(intl_error_get_message( NULL ));
@@ -60,7 +60,7 @@ PHP_FUNCTION( intl_is_failure )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
&err_code ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
RETURN_BOOL( U_FAILURE( err_code ) );
@@ -79,7 +79,7 @@ PHP_FUNCTION( intl_error_name )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
&err_code ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
RETURN_STRING( (char*)u_errorName( err_code ) );
diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c
index a5eb9063cf..a8d0dcbb65 100644
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -120,7 +120,7 @@ static PHP_METHOD(UConverter, toUCallback) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lzzz",
&reason, &source, &codeUnits, &error) == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_converter_default_callback(return_value, ZEND_THIS, reason, error);
@@ -142,7 +142,7 @@ static PHP_METHOD(UConverter, fromUCallback) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lzzz",
&reason, &source, &codePoint, &error) == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_converter_default_callback(return_value, ZEND_THIS, reason, error);
@@ -427,7 +427,7 @@ static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_P
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &enc, &enc_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Bad arguments, "
"expected one string argument", 0);
- return;
+ RETURN_THROWS();
}
intl_errors_reset(&objval->error);
@@ -457,7 +457,7 @@ static void php_converter_do_get_encoding(php_converter_object *objval, UConvert
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Expected no arguments", 0);
- return;
+ RETURN_THROWS();
}
intl_errors_reset(&objval->error);
diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp
index 29950e889f..3d784a997c 100644
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -79,7 +79,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|zs!",
&object, &format, &locale_str, &locale_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!locale_str) {
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index 9faae99042..4aa7d3d42e 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -61,7 +61,7 @@ PHP_FUNCTION(grapheme_strlen)
UErrorCode status;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &string, &string_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ret_len = grapheme_ascii_check((unsigned char *)string, string_len);
@@ -112,7 +112,7 @@ PHP_FUNCTION(grapheme_strpos)
zend_long ret_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
@@ -173,7 +173,7 @@ PHP_FUNCTION(grapheme_stripos)
int is_ascii;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
@@ -240,7 +240,7 @@ PHP_FUNCTION(grapheme_strrpos)
int is_ascii;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
@@ -301,7 +301,7 @@ PHP_FUNCTION(grapheme_strripos)
int is_ascii;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
@@ -379,7 +379,7 @@ PHP_FUNCTION(grapheme_substr)
zend_bool no_length = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ( OUTSIDE_STRING(lstart, str_len)) {
@@ -584,7 +584,7 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas
zend_bool part = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len, &part) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (needle_len == 0) {
@@ -771,7 +771,7 @@ PHP_FUNCTION(grapheme_extract)
zval *next = NULL; /* return offset of next part of the string */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|llz", &str, &str_len, &size, &extract_type, &lstart, &next) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (lstart < 0) {
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index 3b90e855c9..d59239b6ca 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -183,7 +183,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|llz",
&domain, &option, &variant, &idna_info) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (variant != INTL_IDN_VARIANT_UTS46) {
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index e5175abc88..0db2e70bde 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -208,7 +208,7 @@ static zend_off_t getSingletonPos(const char* str)
PHP_NAMED_FUNCTION(zif_locale_get_default)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING( intl_locale_get_default( ) );
@@ -229,7 +229,7 @@ PHP_NAMED_FUNCTION(zif_locale_set_default)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "S", &locale_name) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(locale_name) == 0) {
@@ -396,7 +396,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
&loc_name ,&loc_name_len ) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if(loc_name_len == 0) {
@@ -501,7 +501,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
&loc_name, &loc_name_len ,
&disp_loc_name ,&disp_loc_name_len ) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
if(loc_name_len > ULOC_FULLNAME_CAPACITY) {
@@ -690,7 +690,7 @@ PHP_FUNCTION( locale_get_keywords )
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
&loc_name, &loc_name_len ) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
@@ -909,7 +909,7 @@ PHP_FUNCTION(locale_compose)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "a",
&arr) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
hash_arr = Z_ARRVAL_P( arr );
@@ -1095,7 +1095,7 @@ PHP_FUNCTION(locale_parse)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
&loc_name, &loc_name_len ) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
@@ -1142,7 +1142,7 @@ PHP_FUNCTION(locale_get_all_variants)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
&loc_name, &loc_name_len ) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
if(loc_name_len == 0) {
@@ -1245,7 +1245,7 @@ PHP_FUNCTION(locale_filter_matches)
&lang_tag, &lang_tag_len , &loc_range , &loc_range_len ,
&boolCanonical) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
if(loc_range_len == 0) {
@@ -1518,7 +1518,7 @@ PHP_FUNCTION(locale_lookup)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS!", &arr, &loc_range, &loc_range_len,
&boolCanonical, &fallback_loc_str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if(loc_range_len == 0) {
@@ -1571,7 +1571,7 @@ PHP_FUNCTION(locale_accept_from_http)
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", &http_accept, &http_accept_len) == FAILURE)
{
- return;
+ RETURN_THROWS();
}
if(http_accept_len > ULOC_FULLNAME_CAPACITY) {
/* check each fragment, if any bigger than capacity, can't do it due to bug #72533 */
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index f212f15ff6..2a71e59d47 100644
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
@@ -99,7 +99,7 @@ PHP_FUNCTION( msgfmt_parse_message )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "sss",
&slocale, &slocale_len, &pattern, &pattern_len, &source, &src_len ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
INTL_CHECK_LOCALE_LEN(slocale_len);
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c
index ed0a79243b..791b800162 100644
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -331,7 +331,7 @@ PHP_FUNCTION( normalizer_get_raw_decomposition )
intl_error_reset(NULL);
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &input, &input_length, &form) == FAILURE)) {
- return;
+ RETURN_THROWS();
}
norm = intl_get_normalizer(form, &status);
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index c00513a54a..634d75036b 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -325,7 +325,7 @@ PHP_FUNCTION( resourcebundle_locales )
if( zend_parse_parameters(ZEND_NUM_ARGS(), "s", &bundlename, &bundlename_len ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
if (bundlename_len >= MAXPATHLEN) {
diff --git a/ext/intl/spoofchecker/spoofchecker_create.c b/ext/intl/spoofchecker/spoofchecker_create.c
index 4af2ad8d94..6c4143a580 100644
--- a/ext/intl/spoofchecker/spoofchecker_create.c
+++ b/ext/intl/spoofchecker/spoofchecker_create.c
@@ -33,7 +33,7 @@ PHP_METHOD(Spoofchecker, __construct)
SPOOFCHECKER_METHOD_INIT_VARS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c
index 918f89d3c9..42108ecf01 100644
--- a/ext/intl/spoofchecker/spoofchecker_main.c
+++ b/ext/intl/spoofchecker/spoofchecker_main.c
@@ -31,7 +31,7 @@ PHP_METHOD(Spoofchecker, isSuspicious)
SPOOFCHECKER_METHOD_INIT_VARS;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|z", &text, &text_len, &error_code)) {
- return;
+ RETURN_THROWS();
}
SPOOFCHECKER_METHOD_FETCH_OBJECT;
@@ -64,7 +64,7 @@ PHP_METHOD(Spoofchecker, areConfusable)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &s1, &s1_len,
&s2, &s2_len, &error_code)) {
- return;
+ RETURN_THROWS();
}
SPOOFCHECKER_METHOD_FETCH_OBJECT;
@@ -96,7 +96,7 @@ PHP_METHOD(Spoofchecker, setAllowedLocales)
SPOOFCHECKER_METHOD_INIT_VARS;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s", &locales, &locales_len)) {
- return;
+ RETURN_THROWS();
}
SPOOFCHECKER_METHOD_FETCH_OBJECT;
@@ -119,7 +119,7 @@ PHP_METHOD(Spoofchecker, setChecks)
SPOOFCHECKER_METHOD_INIT_VARS;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &checks)) {
- return;
+ RETURN_THROWS();
}
SPOOFCHECKER_METHOD_FETCH_OBJECT;
@@ -142,7 +142,7 @@ PHP_METHOD(Spoofchecker, setRestrictionLevel)
SPOOFCHECKER_METHOD_INIT_VARS;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &level)) {
- return;
+ RETURN_THROWS();
}
SPOOFCHECKER_METHOD_FETCH_OBJECT;
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 518d63c94a..defeb83b00 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -53,7 +53,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
intl_error_reset(NULL);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str_id, &str_id_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
UErrorCode status = UErrorCode();
@@ -78,7 +78,7 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O",
&zv_timezone, php_date_get_timezone_ce()) == FAILURE) {
- return;
+ RETURN_THROWS();
}
tzobj = Z_PHPTIMEZONE_P(zv_timezone);
@@ -115,7 +115,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_gmt)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
timezone_object_construct(TimeZone::getGMT(), return_value, 0);
@@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_unknown)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
timezone_object_construct(&TimeZone::getUnknown(), return_value, 0);
@@ -141,7 +141,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
/* double indirection to have the zend engine destroy the new zval that
* results from separation */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (arg == NULL || Z_TYPE_P(arg) == IS_NULL) {
@@ -201,7 +201,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&str_id, &str_id_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
UErrorCode status = UErrorCode();
@@ -230,7 +230,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|s!l!",
&zoneType, &region, &region_len, &offset_arg, &arg3isnull) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zoneType != UCAL_ZONE_TYPE_ANY && zoneType != UCAL_ZONE_TYPE_CANONICAL
@@ -269,7 +269,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z",
&str_id, &str_id_len, &is_systemid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
UErrorCode status = UErrorCode();
@@ -306,7 +306,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&str_id, &str_id_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
UErrorCode status = UErrorCode();
@@ -328,7 +328,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
UErrorCode status = UErrorCode();
@@ -347,7 +347,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
intl_error_reset(NULL);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &str_id, &str_id_len, &index) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX) {
@@ -611,7 +611,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
UErrorCode error;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &id) == FAILURE) {
- return;
+ RETURN_THROWS();
}
error = U_ZERO_ERROR;
@@ -649,7 +649,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id)
UErrorCode error;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &winID, &region) == FAILURE) {
- return;
+ RETURN_THROWS();
}
error = U_ZERO_ERROR;
diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c
index bbda16b43a..7b8254c5ea 100644
--- a/ext/intl/transliterator/transliterator_methods.c
+++ b/ext/intl/transliterator/transliterator_methods.c
@@ -113,7 +113,7 @@ PHP_FUNCTION( transliterator_create )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|l",
&str_id, &str_id_len, &direction ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
object = return_value;
@@ -145,7 +145,7 @@ PHP_FUNCTION( transliterator_create_from_rules )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|l",
&str_rules, &str_rules_len, &direction ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
if( ( direction != TRANSLITERATOR_FORWARD ) && (direction != TRANSLITERATOR_REVERSE ) )
@@ -242,7 +242,7 @@ PHP_FUNCTION( transliterator_list_ids )
if( zend_parse_parameters_none() == FAILURE )
{
- return;
+ RETURN_THROWS();
}
en = utrans_openIDs( &status );
@@ -304,7 +304,7 @@ PHP_FUNCTION( transliterator_transliterate )
if( zend_parse_parameters( ZEND_NUM_ARGS(), "zs|ll",
&arg1, &str, &str_len, &start, &limit ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
if( Z_TYPE_P( arg1 ) == IS_OBJECT &&
@@ -336,7 +336,7 @@ PHP_FUNCTION( transliterator_transliterate )
else if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|ll",
&str, &str_len, &start, &limit ) == FAILURE )
{
- return;
+ RETURN_THROWS();
}
if( limit < -1 )
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c
index 3d6f7519cc..f9ed3153ad 100644
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -56,7 +56,7 @@ IC_METHOD(chr) {
int buffer_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -84,7 +84,7 @@ IC_METHOD(ord) {
zval *zcp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -106,7 +106,7 @@ IC_METHOD(hasBinaryProperty) {
zval *zcp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -128,7 +128,7 @@ IC_METHOD(getIntPropertyValue) {
zval *zcp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -147,7 +147,7 @@ IC_METHOD(getIntPropertyMinValue) {
zend_long prop;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &prop) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(u_getIntPropertyMinValue((UProperty)prop));
@@ -162,7 +162,7 @@ IC_METHOD(getIntPropertyMaxValue) {
zend_long prop;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &prop) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(u_getIntPropertyMaxValue((UProperty)prop));
@@ -178,7 +178,7 @@ IC_METHOD(getNumericValue) {
zval *zcp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -228,7 +228,7 @@ IC_METHOD(enumCharTypes) {
enumCharType_data context;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "f", &context.fci, &context.fci_cache) == FAILURE) {
- return;
+ RETURN_THROWS();
}
u_enumCharTypes((UCharEnumTypeRange*)enumCharType_callback, &context);
}
@@ -243,7 +243,7 @@ IC_METHOD(getBlockCode) {
zval *zcp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -268,7 +268,7 @@ IC_METHOD(charName) {
int32_t buffer_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -300,7 +300,7 @@ IC_METHOD(charFromName) {
UErrorCode error = U_ZERO_ERROR;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &name, &name_len, &nameChoice) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ret = u_charFromName((UCharNameChoice)nameChoice, name, &error);
@@ -354,7 +354,7 @@ IC_METHOD(enumCharNames) {
UErrorCode error = U_ZERO_ERROR;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzf|l", &zstart, &zlimit, &context.fci, &context.fci_cache, &nameChoice) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&start, zstart) == FAILURE || convert_cp(&limit, zlimit) == FAILURE) {
@@ -377,7 +377,7 @@ IC_METHOD(getPropertyName) {
const char *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &property, &nameChoice) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ret = u_getPropertyName((UProperty)property, (UPropertyNameChoice)nameChoice);
@@ -400,7 +400,7 @@ IC_METHOD(getPropertyEnum) {
size_t alias_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &alias, &alias_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(u_getPropertyEnum(alias));
@@ -418,7 +418,7 @@ IC_METHOD(getPropertyValueName) {
const char *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l", &property, &value, &nameChoice) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ret = u_getPropertyValueName((UProperty)property, value, (UPropertyNameChoice)nameChoice);
@@ -443,7 +443,7 @@ IC_METHOD(getPropertyValueEnum) {
size_t name_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &property, &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(u_getPropertyValueEnum((UProperty)property, name));
@@ -461,7 +461,7 @@ IC_METHOD(foldCase) {
zend_long options = U_FOLD_CASE_DEFAULT;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -493,7 +493,7 @@ IC_METHOD(digit) {
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &radix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -519,7 +519,7 @@ IC_METHOD(forDigit) {
zend_long digit, radix = 10;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &digit, &radix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(u_forDigit(digit, radix));
@@ -537,7 +537,7 @@ IC_METHOD(charAge) {
int i;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
@@ -560,7 +560,7 @@ IC_METHOD(getUnicodeVersion) {
int i;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
u_getUnicodeVersion(version);
@@ -584,7 +584,7 @@ IC_METHOD(getFC_NFKC_Closure) {
UErrorCode error = U_ZERO_ERROR;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (convert_cp(&cp, zcp) == FAILURE) {
diff --git a/ext/json/json.c b/ext/json/json.c
index 5c97e9678d..9a8f259f01 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -340,7 +340,7 @@ static PHP_FUNCTION(json_decode)
static PHP_FUNCTION(json_last_error)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(JSON_G(error_code));
@@ -352,7 +352,7 @@ static PHP_FUNCTION(json_last_error)
static PHP_FUNCTION(json_last_error_msg)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(php_json_get_error_msg(JSON_G(error_code)));
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 6be5dc4fb0..1ca47d0b47 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -1003,7 +1003,7 @@ PHP_FUNCTION(ldap_connect)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|slssl", &host, &hostlen, &port, &wallet, &walletlen, &walletpasswd, &walletpasswdlen, &authmode) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() == 5) {
@@ -1011,7 +1011,7 @@ PHP_FUNCTION(ldap_connect)
}
#else
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sl", &host, &hostlen, &port) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
#endif
@@ -1124,7 +1124,7 @@ PHP_FUNCTION(ldap_bind)
int rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ss", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1181,7 +1181,7 @@ PHP_FUNCTION(ldap_bind_ext)
int rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ssa", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1346,7 +1346,7 @@ PHP_FUNCTION(ldap_sasl_bind)
php_ldap_bictx *ctx;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|sssssss", &link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len, &sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id, &authz_id_len, &props, &props_len) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1379,7 +1379,7 @@ PHP_FUNCTION(ldap_unbind)
ldap_linkdata *ld;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &link) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1447,7 +1447,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
if (zend_parse_parameters(argcount, "zzz|a/lllla/", &link, &base_dn, &filter, &attrs, &attrsonly,
&sizelimit, &timelimit, &deref, &serverctrls) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Reverse -> fall through */
@@ -1710,7 +1710,7 @@ PHP_FUNCTION(ldap_free_result)
LDAPMessage *ldap_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ldap_result = (LDAPMessage *)zend_fetch_resource(Z_RES_P(result), "ldap result", le_result)) == NULL) {
@@ -1731,7 +1731,7 @@ PHP_FUNCTION(ldap_count_entries)
LDAPMessage *ldap_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1756,7 +1756,7 @@ PHP_FUNCTION(ldap_first_entry)
LDAPMessage *ldap_result, *entry;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1789,7 +1789,7 @@ PHP_FUNCTION(ldap_next_entry)
LDAPMessage *entry_next;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1828,7 +1828,7 @@ PHP_FUNCTION(ldap_get_entries)
char *dn;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1923,7 +1923,7 @@ PHP_FUNCTION(ldap_first_attribute)
zend_long dummy_ber;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry, &dummy_ber) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -1956,7 +1956,7 @@ PHP_FUNCTION(ldap_next_attribute)
zend_long dummy_ber;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry, &dummy_ber) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2003,7 +2003,7 @@ PHP_FUNCTION(ldap_get_attributes)
BerElement *ber;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2061,7 +2061,7 @@ PHP_FUNCTION(ldap_get_values_len)
size_t attr_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrs", &link, &result_entry, &attr, &attr_len) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2100,7 +2100,7 @@ PHP_FUNCTION(ldap_get_dn)
char *text;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2135,7 +2135,7 @@ PHP_FUNCTION(ldap_explode_dn)
size_t dn_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &dn, &dn_len, &with_attrib) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (!(ldap_value = ldap_explode_dn(dn, with_attrib))) {
@@ -2166,7 +2166,7 @@ PHP_FUNCTION(ldap_dn2ufn)
size_t dn_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &dn, &dn_len) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
ufn = ldap_dn2ufn(dn);
@@ -2204,7 +2204,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper, int ext)
int is_full_add=0; /* flag for full add operation so ldap_mod_add can be put back into oper, gerrit THomson */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a", &link, &dn, &dn_len, &entry, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2444,7 +2444,7 @@ static void php_ldap_do_delete(INTERNAL_FUNCTION_PARAMETERS, int ext)
size_t dn_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|a", &link, &dn, &dn_len, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2593,7 +2593,7 @@ PHP_FUNCTION(ldap_modify_batch)
*/
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a", &link, &dn, &dn_len, &mods, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2876,7 +2876,7 @@ PHP_FUNCTION(ldap_errno)
ldap_linkdata *ld;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &link) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2894,7 +2894,7 @@ PHP_FUNCTION(ldap_err2str)
zend_long perrno;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &perrno) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(ldap_err2string(perrno));
@@ -2910,7 +2910,7 @@ PHP_FUNCTION(ldap_error)
int ld_errno;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &link) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2937,7 +2937,7 @@ PHP_FUNCTION(ldap_compare)
struct berval lvalue;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsss|a", &link, &dn, &dn_len, &attr, &attr_len, &value, &value_len, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -2990,7 +2990,7 @@ PHP_FUNCTION(ldap_get_option)
zend_long option;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz", &link, &option, &retval) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3159,7 +3159,7 @@ PHP_FUNCTION(ldap_set_option)
zend_long option;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zlz", &link, &option, &newval) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE_P(link) == IS_NULL) {
@@ -3345,7 +3345,7 @@ PHP_FUNCTION(ldap_parse_result)
int rc, lerrcode, myargcount = ZEND_NUM_ARGS();
if (zend_parse_parameters(myargcount, "rrz|zzzz", &link, &result, &errcode, &matcheddn, &errmsg, &referrals, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3420,7 +3420,7 @@ PHP_FUNCTION(ldap_parse_exop)
int rc, myargcount = ZEND_NUM_ARGS();
if (zend_parse_parameters(myargcount, "rr|zz", &link, &result, &retdata, &retoid) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3475,7 +3475,7 @@ PHP_FUNCTION(ldap_first_reference)
LDAPMessage *ldap_result, *entry;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3508,7 +3508,7 @@ PHP_FUNCTION(ldap_next_reference)
LDAPMessage *entry_next;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3541,7 +3541,7 @@ PHP_FUNCTION(ldap_parse_reference)
ldap_resultentry *resultentry;
char **lreferrals, **refp;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrz", &link, &result_entry, &referrals) != SUCCESS) {
+ if (RETURN_THROWS()(ZEND_NUM_ARGS(), "rrz", &link, &result_entry, &referrals) != SUCCESS) {
return;
}
@@ -3590,7 +3590,7 @@ static void php_ldap_do_rename(INTERNAL_FUNCTION_PARAMETERS, int ext)
zend_bool deleteoldrdn;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsssb|a", &link, &dn, &dn_len, &newrdn, &newrdn_len, &newparent, &newparent_len, &deleteoldrdn, &serverctrls) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3683,7 +3683,7 @@ PHP_FUNCTION(ldap_start_tls)
int rc, protocol = LDAP_VERSION3;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &link) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3745,7 +3745,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
ldap_linkdata *ld;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &link, &callback) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -3837,7 +3837,7 @@ PHP_FUNCTION(ldap_escape)
zend_bool map[256] = {0}, havecharlist = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sl", &value, &valuelen, &ignores, &ignoreslen, &flags) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (!valuelen) {
@@ -3877,7 +3877,7 @@ static void php_ldap_do_translate(INTERNAL_FUNCTION_PARAMETERS, int way)
int result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &value, &value_len) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (value_len == 0) {
@@ -3935,7 +3935,7 @@ PHP_FUNCTION(ldap_control_paged_result)
int rc, myargcount = ZEND_NUM_ARGS();
if (zend_parse_parameters(myargcount, "rl|bs", &link, &pagesize, &iscritical, &cookie, &cookie_len) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE_P(link) == IS_NULL) {
@@ -4027,7 +4027,7 @@ PHP_FUNCTION(ldap_control_paged_result_response)
int rc, lerrcode, myargcount = ZEND_NUM_ARGS();
if (zend_parse_parameters(myargcount, "rr|zz", &link, &result, &cookie, &estimated) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -4125,7 +4125,7 @@ PHP_FUNCTION(ldap_exop)
int rc, msgid;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS|S!a!zz", &link, &reqoid, &reqdata, &serverctrls, &retdata, &retoid) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -4231,7 +4231,7 @@ PHP_FUNCTION(ldap_exop_passwd)
lnewpw.bv_len = 0;
if (zend_parse_parameters(myargcount, "r|sssz/", &link, &luser.bv_val, &luser.bv_len, &loldpw.bv_val, &loldpw.bv_len, &lnewpw.bv_val, &lnewpw.bv_len, &serverctrls) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -4316,7 +4316,7 @@ PHP_FUNCTION(ldap_exop_whoami)
int rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
@@ -4354,7 +4354,7 @@ PHP_FUNCTION(ldap_exop_refresh)
int rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz", &link, &ldn.bv_val, &ldn.bv_len, &ttl) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) {
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index e330022eeb..4564b44c66 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -980,7 +980,7 @@ static PHP_FUNCTION(libxml_get_last_error)
xmlErrorPtr error;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
error = xmlGetLastError();
@@ -1015,7 +1015,7 @@ static PHP_FUNCTION(libxml_get_errors)
xmlErrorPtr error;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (LIBXML(error_list)) {
@@ -1056,7 +1056,7 @@ static PHP_FUNCTION(libxml_get_errors)
static PHP_FUNCTION(libxml_clear_errors)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
xmlResetLastError();
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 516d401094..115af92fc2 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -1393,7 +1393,7 @@ PHP_FUNCTION(mb_language)
zend_string *name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name == NULL) {
RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language)));
@@ -1419,7 +1419,7 @@ PHP_FUNCTION(mb_internal_encoding)
const mbfl_encoding *encoding;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name == NULL) {
name = MBSTRG(current_internal_encoding) ? MBSTRG(current_internal_encoding)->name: NULL;
@@ -1454,7 +1454,7 @@ PHP_FUNCTION(mb_http_input)
retname = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &typ, &typ_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (typ == NULL) {
result = MBSTRG(http_input_identify);
@@ -1543,7 +1543,7 @@ PHP_FUNCTION(mb_http_output)
const mbfl_encoding *encoding;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name == NULL) {
@@ -1574,7 +1574,7 @@ PHP_FUNCTION(mb_detect_order)
zval *arg1 = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!arg1) {
@@ -1651,7 +1651,7 @@ PHP_FUNCTION(mb_substitute_character)
zval *arg1 = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!arg1) {
@@ -1711,7 +1711,7 @@ PHP_FUNCTION(mb_preferred_mime_name)
size_t name_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
} else {
no_encoding = mbfl_name2no_encoding(name);
if (no_encoding == mbfl_no_encoding_invalid) {
@@ -1745,7 +1745,7 @@ PHP_FUNCTION(mb_parse_str)
track_vars_array = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &encstr, &encstr_len, &track_vars_array) == FAILURE) {
- return;
+ RETURN_THROWS();
}
track_vars_array = zend_try_array_init(track_vars_array);
@@ -1791,7 +1791,7 @@ PHP_FUNCTION(mb_output_handler)
char *s, *mimetype = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &arg_string, &arg_string_len, &arg_status) == FAILURE) {
- return;
+ RETURN_THROWS();
}
encoding = MBSTRG(current_http_output_encoding);
@@ -2090,7 +2090,7 @@ PHP_FUNCTION(mb_strpos)
size_t n;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|lS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2149,7 +2149,7 @@ PHP_FUNCTION(mb_strrpos)
zend_long offset = 0, n;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|lS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2186,7 +2186,7 @@ PHP_FUNCTION(mb_stripos)
zend_string *from_encoding = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|lS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (needle.len == 0) {
@@ -2214,7 +2214,7 @@ PHP_FUNCTION(mb_strripos)
zend_string *from_encoding = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|lS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
n = php_mb_stripos(1, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding);
@@ -2237,7 +2237,7 @@ PHP_FUNCTION(mb_strstr)
zend_bool part = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2288,7 +2288,7 @@ PHP_FUNCTION(mb_strrchr)
zend_bool part = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2341,7 +2341,7 @@ PHP_FUNCTION(mb_stristr)
zend_string *from_encoding = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2392,7 +2392,7 @@ PHP_FUNCTION(mb_strrichr)
zend_string *from_encoding = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2437,7 +2437,7 @@ PHP_FUNCTION(mb_substr_count)
zend_string *enc_name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|S", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
haystack.no_language = needle.no_language = MBSTRG(language);
@@ -2473,7 +2473,7 @@ PHP_FUNCTION(mb_substr)
mbfl_string string, result, *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!S", &str, &str_len, &from, &len, &len_is_null, &encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
string.no_language = MBSTRG(language);
@@ -2536,7 +2536,7 @@ PHP_FUNCTION(mb_strcut)
mbfl_string string, result, *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!S", (char **)&string.val, &string.len, &from, &len, &len_is_null, &encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
string.no_language = MBSTRG(language);
@@ -2593,7 +2593,7 @@ PHP_FUNCTION(mb_strwidth)
zend_string *enc_name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S", (char **)&string.val, &string.len, &enc_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
string.no_language = MBSTRG(language);
@@ -2622,7 +2622,7 @@ PHP_FUNCTION(mb_strimwidth)
mbfl_string string, result, marker, *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll|sS", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
string.no_language = marker.no_language = MBSTRG(language);
@@ -2873,7 +2873,7 @@ PHP_FUNCTION(mb_convert_encoding)
HashTable *target_hash;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|z", &input, &arg_new, &new_len, &arg_old) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE_P(input) != IS_STRING && Z_TYPE_P(input) != IS_ARRAY) {
@@ -2971,7 +2971,7 @@ PHP_FUNCTION(mb_convert_case)
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|S!", &str, &str_len,
&case_mode, &from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
enc = php_mb_get_encoding(from_encoding);
@@ -3008,7 +3008,7 @@ PHP_FUNCTION(mb_strtoupper)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len,
&from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
enc = php_mb_get_encoding(from_encoding);
@@ -3042,7 +3042,7 @@ PHP_FUNCTION(mb_strtolower)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len,
&from_encoding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
enc = php_mb_get_encoding(from_encoding);
@@ -3077,7 +3077,7 @@ PHP_FUNCTION(mb_detect_encoding)
size_t size;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z!b", &str, &str_len, &encoding_list, &strict) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* make encoding list */
@@ -3150,7 +3150,7 @@ PHP_FUNCTION(mb_list_encodings)
int i;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -3171,7 +3171,7 @@ PHP_FUNCTION(mb_encoding_aliases)
size_t name_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
encoding = mbfl_name2encoding(name);
@@ -3208,7 +3208,7 @@ PHP_FUNCTION(mb_encode_mimeheader)
string.encoding = MBSTRG(current_internal_encoding);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
- return;
+ RETURN_THROWS();
}
charset = &mbfl_encoding_pass;
@@ -3258,7 +3258,7 @@ PHP_FUNCTION(mb_decode_mimeheader)
string.encoding = MBSTRG(current_internal_encoding);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", (char **)&string.val, &string.len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
mbfl_string_init(&result);
@@ -3284,7 +3284,7 @@ PHP_FUNCTION(mb_convert_kana)
zend_string *encname = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sS", (char **)&string.val, &string.len, &optstr, &optstr_len, &encname) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* option */
@@ -3481,7 +3481,7 @@ PHP_FUNCTION(mb_convert_variables)
int recursion_error = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz+", &to_enc, &to_enc_len, &zfrom_enc, &args, &argc) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* new encoding */
@@ -3606,11 +3606,11 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
if (type == 0) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sh|sb", &str, &str_len, &target_hash, &encoding, &encoding_len, &is_hex) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sh|s", &str, &str_len, &target_hash, &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -3913,7 +3913,7 @@ PHP_FUNCTION(mb_send_mail)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|zS", &to, &to_len, &subject, &subject_len, &message, &message_len, &headers, &extra_cmd) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* ASCIIZ check */
@@ -4162,7 +4162,7 @@ PHP_FUNCTION(mb_get_info)
const mbfl_encoding **entry;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &typ, &typ_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!typ || !strcasecmp("all", typ)) {
@@ -4447,7 +4447,7 @@ PHP_FUNCTION(mb_check_encoding)
zend_string *enc = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zS", &input, &enc) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* FIXME: Actually check all inputs, except $_FILES file content. */
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 45f84e69f1..39fc77bdb7 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -839,7 +839,7 @@ PHP_FUNCTION(mb_regex_encoding)
OnigEncoding mbctype;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!encoding) {
@@ -897,7 +897,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &arg_pattern, &arg_pattern_len, &string, &string_len, &array) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (array != NULL) {
@@ -1036,7 +1036,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
&replace, &replace_len,
&string, &string_len,
&option_str, &option_str_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sfs|s",
@@ -1044,7 +1044,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
&arg_replace_fci, &arg_replace_fci_cache,
&string, &string_len,
&option_str, &option_str_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1251,7 +1251,7 @@ PHP_FUNCTION(mb_split)
zend_long count = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (count > 0) {
@@ -1342,7 +1342,7 @@ PHP_FUNCTION(mb_ereg_match)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|s",
&arg_pattern, &arg_pattern_len, &string, &string_len,
&option_str, &option_str_len)==FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option_str != NULL) {
@@ -1395,7 +1395,7 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
OnigSyntaxType *syntax;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
option = MBREX(regex_default_options);
@@ -1530,7 +1530,7 @@ PHP_FUNCTION(mb_ereg_search_init)
OnigOptionType option;
if (zend_parse_parameters(argc, "S|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc > 1 && arg_pattern_len == 0) {
@@ -1586,7 +1586,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
OnigUChar *str;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) {
@@ -1624,7 +1624,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
PHP_FUNCTION(mb_ereg_search_getpos)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_LONG(MBREX(search_pos));
@@ -1638,7 +1638,7 @@ PHP_FUNCTION(mb_ereg_search_setpos)
zend_long position;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &position) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Accept negative position if length of search string can be determined */
@@ -1683,7 +1683,7 @@ PHP_FUNCTION(mb_regex_set_options)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s",
&string, &string_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (string != NULL) {
opt = 0;
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 1fbc230e63..4bb8ee76c1 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -1011,7 +1011,7 @@ PHP_FUNCTION(mysqli_stmt_construct)
{
case 1: /* mysql_stmt_init */
if (zend_parse_parameters(1, "O", &mysql_link, mysqli_link_class_entry)==FAILURE) {
- return;
+ RETURN_THROWS();
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
@@ -1021,7 +1021,7 @@ PHP_FUNCTION(mysqli_stmt_construct)
break;
case 2:
if (zend_parse_parameters(2, "Os", &mysql_link, mysqli_link_class_entry, &statement, &statement_len)==FAILURE) {
- return;
+ RETURN_THROWS();
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
@@ -1068,12 +1068,12 @@ PHP_FUNCTION(mysqli_result_construct)
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_parse_parameters(1, "O", &mysql_link, mysqli_link_class_entry)==FAILURE) {
- return;
+ RETURN_THROWS();
}
break;
case 2:
if (zend_parse_parameters(2, "Ol", &mysql_link, mysqli_link_class_entry, &resmode)==FAILURE) {
- return;
+ RETURN_THROWS();
}
break;
default:
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 206b00dfb6..a2043d0498 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -794,7 +794,7 @@ PHP_FUNCTION(mysqli_debug)
size_t debug_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &debug, &debug_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
mysql_debug(debug);
@@ -1376,13 +1376,13 @@ PHP_FUNCTION(mysqli_get_client_info)
{
if (getThis()) {
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
zval *mysql_link;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1398,7 +1398,7 @@ PHP_FUNCTION(mysqli_get_client_info)
PHP_FUNCTION(mysqli_get_client_version)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG((zend_long)mysql_get_client_version());
@@ -1502,7 +1502,7 @@ void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_method)
MY_MYSQL *mysql;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (is_method && (Z_MYSQLI_P(getThis()))->ptr) {
@@ -2640,7 +2640,7 @@ PHP_FUNCTION(mysqli_thread_id)
PHP_FUNCTION(mysqli_thread_safe)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(mysql_thread_safe());
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 6c47d0a66a..b43d94f85d 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -83,7 +83,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
if (!is_real_connect) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s!s!s!l!s!", &hostname, &hostname_len, &username, &username_len,
&passwd, &passwd_len, &dbname, &dbname_len, &port, &port_is_null, &socket, &socket_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (object && instanceof_function(Z_OBJCE_P(object), mysqli_link_class_entry)) {
@@ -391,7 +391,7 @@ PHP_FUNCTION(mysqli_link_construct)
PHP_FUNCTION(mysqli_connect_errno)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(MyG(error_no));
@@ -403,7 +403,7 @@ PHP_FUNCTION(mysqli_connect_errno)
PHP_FUNCTION(mysqli_connect_error)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (MyG(error_msg)) {
@@ -459,7 +459,7 @@ PHP_FUNCTION(mysqli_fetch_all)
PHP_FUNCTION(mysqli_get_client_stats)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
mysqlnd_get_client_stats(return_value);
}
@@ -846,7 +846,7 @@ PHP_FUNCTION(mysqli_poll)
int desc_num;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!al|l", &r_array, &e_array, &dont_poll_array, &sec, &usec) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sec < 0 || usec < 0) {
php_error_docref(NULL, E_WARNING, "Negative values passed for sec and/or usec");
@@ -1277,7 +1277,7 @@ PHP_FUNCTION(mysqli_release_savepoint)
PHP_FUNCTION(mysqli_get_links_stats)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c
index 7a6ef5a0e8..64cff6cb49 100644
--- a/ext/mysqli/mysqli_report.c
+++ b/ext/mysqli/mysqli_report.c
@@ -33,7 +33,7 @@ PHP_FUNCTION(mysqli_report)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
MyG(report_mode) = flags;
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index dca0c5b726..4173acb031 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -255,7 +255,7 @@ PHP_METHOD(mysqli_warning, __construct)
MYSQLI_RESOURCE *mysqli_resource;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &z) == FAILURE) {
- return;
+ RETURN_THROWS();
}
obj = Z_MYSQLI_P(z);
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index 4182a898c6..29177028f2 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -50,7 +50,7 @@ PHP_FUNCTION(oci_register_taf_callback)
zend_string *callback_name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!", &z_connection, &callback) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (callback) {
@@ -101,7 +101,7 @@ PHP_FUNCTION(oci_unregister_taf_callback)
php_oci_connection *connection;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_connection) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
@@ -267,7 +267,7 @@ PHP_FUNCTION(oci_free_descriptor)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -296,12 +296,12 @@ PHP_FUNCTION(oci_lob_save)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &data, &data_len, &offset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &offset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -335,12 +335,12 @@ PHP_FUNCTION(oci_lob_import)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -369,7 +369,7 @@ PHP_FUNCTION(oci_lob_load)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -407,12 +407,12 @@ PHP_FUNCTION(oci_lob_read)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_descriptor, oci_lob_class_entry_ptr, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -452,7 +452,7 @@ PHP_FUNCTION(oci_lob_eof)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -481,7 +481,7 @@ PHP_FUNCTION(oci_lob_tell)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -505,7 +505,7 @@ PHP_FUNCTION(oci_lob_rewind)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -533,12 +533,12 @@ PHP_FUNCTION(oci_lob_seek)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &offset, &whence) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol|l", &z_descriptor, oci_lob_class_entry_ptr, &offset, &whence) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -588,7 +588,7 @@ PHP_FUNCTION(oci_lob_size)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -619,7 +619,7 @@ PHP_FUNCTION(oci_lob_write)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &data, &data_len, &write_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() == 2) {
@@ -628,7 +628,7 @@ PHP_FUNCTION(oci_lob_write)
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &write_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() == 3) {
@@ -663,12 +663,12 @@ PHP_FUNCTION(oci_lob_append)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -704,12 +704,12 @@ PHP_FUNCTION(oci_lob_truncate)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &trim_length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &z_descriptor, oci_lob_class_entry_ptr, &trim_length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -744,7 +744,7 @@ PHP_FUNCTION(oci_lob_erase)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ll", &offset, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 0 && offset < 0) {
@@ -759,7 +759,7 @@ PHP_FUNCTION(oci_lob_erase)
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|ll", &z_descriptor, oci_lob_class_entry_ptr, &offset, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 1 && offset < 0) {
@@ -797,12 +797,12 @@ PHP_FUNCTION(oci_lob_flush)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flush_flag) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &z_descriptor, oci_lob_class_entry_ptr, &flush_flag) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -835,12 +835,12 @@ PHP_FUNCTION(ocisetbufferinglob)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &flag) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &z_descriptor, oci_lob_class_entry_ptr, &flag) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -867,7 +867,7 @@ PHP_FUNCTION(ocigetbufferinglob)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -894,7 +894,7 @@ PHP_FUNCTION(oci_lob_copy)
zend_long length = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO|l", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) {
@@ -936,7 +936,7 @@ PHP_FUNCTION(oci_lob_is_equal)
boolean is_equal;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_descriptor_first, oci_lob_class_entry_ptr, &z_descriptor_second, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp_first = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor")-1)) == NULL) {
@@ -978,7 +978,7 @@ PHP_FUNCTION(oci_lob_export)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ll", &filename, &filename_len, &start, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 1 && start < 0) {
@@ -992,7 +992,7 @@ PHP_FUNCTION(oci_lob_export)
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 2 && start < 0) {
@@ -1086,12 +1086,12 @@ PHP_FUNCTION(oci_lob_write_temporary)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &data, &data_len, &type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1118,7 +1118,7 @@ PHP_FUNCTION(oci_lob_close)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1146,7 +1146,7 @@ PHP_FUNCTION(oci_new_descriptor)
zend_long type = OCI_DTYPE_LOB;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &z_connection, &type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
@@ -1415,7 +1415,7 @@ PHP_FUNCTION(oci_cancel)
php_oci_statement *statement;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_statement) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
@@ -2305,7 +2305,7 @@ PHP_FUNCTION(oci_free_collection)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2332,12 +2332,12 @@ PHP_FUNCTION(oci_collection_append)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &value, &value_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &z_collection, oci_coll_class_entry_ptr, &value, &value_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2366,12 +2366,12 @@ PHP_FUNCTION(oci_collection_element_get)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &element_index) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_collection, oci_coll_class_entry_ptr, &element_index) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2399,12 +2399,12 @@ PHP_FUNCTION(oci_collection_assign)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection_from, oci_coll_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_collection_dest, oci_coll_class_entry_ptr, &z_collection_from, oci_coll_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2440,12 +2440,12 @@ PHP_FUNCTION(oci_collection_element_assign)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &element_index, &value, &value_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ols", &z_collection, oci_coll_class_entry_ptr, &element_index, &value, &value_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2473,7 +2473,7 @@ PHP_FUNCTION(oci_collection_size)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2501,7 +2501,7 @@ PHP_FUNCTION(oci_collection_max)
if (!getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2529,12 +2529,12 @@ PHP_FUNCTION(oci_collection_trim)
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &trim_size) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_collection, oci_coll_class_entry_ptr, &trim_size) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2563,7 +2563,7 @@ PHP_FUNCTION(oci_new_collection)
size_t tdo_len, schema_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|s", &z_connection, &tdo, &tdo_len, &schema, &schema_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 071b36c817..67a51feb3f 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -661,7 +661,7 @@ void php_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
zend_long flag;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &pv_res, &flag) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -799,7 +799,7 @@ void odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int type)
zval *pv_conn;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_conn) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -846,7 +846,7 @@ void odbc_column_lengths(INTERNAL_FUNCTION_PARAMETERS, int type)
zend_long pv_num;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &pv_res, &pv_num) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -883,7 +883,7 @@ PHP_FUNCTION(odbc_close_all)
zend_resource *p;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Loop through list and close all statements */
@@ -941,7 +941,7 @@ PHP_FUNCTION(odbc_prepare)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pv_conn, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -1048,7 +1048,7 @@ PHP_FUNCTION(odbc_execute)
RETCODE rc;
if (zend_parse_parameters(numArgs, "r|a", &pv_res, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -1254,7 +1254,7 @@ PHP_FUNCTION(odbc_cursor)
RETCODE rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -1313,7 +1313,7 @@ PHP_FUNCTION(odbc_data_source)
SQLSMALLINT len1=0, len2=0, fetch_type;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zv_conn, &zv_fetch_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
fetch_type = (SQLSMALLINT) zv_fetch_type;
@@ -1378,7 +1378,7 @@ PHP_FUNCTION(odbc_exec)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &pv_conn, &query, &query_len, &pv_flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -1465,7 +1465,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
zend_long pv_row = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pv_res, &pv_row) == FAILURE) {
- return;
+ RETURN_THROWS();
}
rownum = pv_row;
@@ -1473,7 +1473,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
zval *pv_res, tmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#endif
@@ -1619,13 +1619,13 @@ PHP_FUNCTION(odbc_fetch_into)
#ifdef HAVE_SQL_EXTENDED_FETCH
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|l", &pv_res, &pv_res_arr, &pv_row) == FAILURE) {
- return;
+ RETURN_THROWS();
}
rownum = pv_row;
#else
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &pv_res, &pv_res_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#endif /* HAVE_SQL_EXTENDED_FETCH */
@@ -1732,7 +1732,7 @@ PHP_FUNCTION(solid_fetch_prev)
zval *pv_res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -1772,7 +1772,7 @@ PHP_FUNCTION(odbc_fetch_row)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pv_res, &pv_row) == FAILURE) {
- return;
+ RETURN_THROWS();
}
rownum = pv_row;
@@ -1833,7 +1833,7 @@ PHP_FUNCTION(odbc_result)
field = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &pv_res, &pv_field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE_P(pv_field) == IS_STRING) {
@@ -2019,7 +2019,7 @@ PHP_FUNCTION(odbc_result_all)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s", &pv_res, &pv_format, &pv_format_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2136,7 +2136,7 @@ PHP_FUNCTION(odbc_free_result)
int i;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2282,7 +2282,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
* defaulting to the cursors default
*/
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|l", &db, &db_len, &uid, &uid_len, &pwd, &pwd_len, &pv_opt) == FAILURE) {
- return;
+ RETURN_THROWS();
}
cur_opt = pv_opt;
@@ -2435,7 +2435,7 @@ PHP_FUNCTION(odbc_close)
int is_pconn = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_conn) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -2472,7 +2472,7 @@ PHP_FUNCTION(odbc_num_rows)
zval *pv_res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2494,7 +2494,7 @@ PHP_FUNCTION(odbc_next_result)
int rc, i;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2545,7 +2545,7 @@ PHP_FUNCTION(odbc_num_fields)
zval *pv_res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2565,7 +2565,7 @@ PHP_FUNCTION(odbc_field_name)
zend_long pv_num;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &pv_res, &pv_num) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2602,7 +2602,7 @@ PHP_FUNCTION(odbc_field_type)
zend_long pv_num;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &pv_res, &pv_num) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2655,7 +2655,7 @@ PHP_FUNCTION(odbc_field_num)
zval *pv_res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pv_res, &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) {
@@ -2692,7 +2692,7 @@ PHP_FUNCTION(odbc_autocommit)
zend_long pv_onoff = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pv_conn, &pv_onoff) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -2743,7 +2743,7 @@ static void php_odbc_lasterror(INTERNAL_FUNCTION_PARAMETERS, int mode)
char *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r", &pv_handle) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() == 1) {
@@ -2800,7 +2800,7 @@ PHP_FUNCTION(odbc_setoption)
zend_long pv_which, pv_opt, pv_val;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &pv_handle, &pv_which, &pv_opt, &pv_val) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (pv_which) {
@@ -2858,7 +2858,7 @@ PHP_FUNCTION(odbc_tables)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len,
&table, &table_len, &type, &type_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -2927,7 +2927,7 @@ PHP_FUNCTION(odbc_columns)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len,
&table, &table_len, &column, &column_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -2999,7 +2999,7 @@ PHP_FUNCTION(odbc_columnprivileges)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len,
&table, &table_len, &column, &column_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -3065,7 +3065,7 @@ PHP_FUNCTION(odbc_foreignkeys)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs!sssss", &pv_conn, &pcat, &pcat_len, &pschema, &pschema_len,
&ptable, &ptable_len, &fcat, &fcat_len, &fschema, &fschema_len, &ftable, &ftable_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#if defined(HAVE_DBMAKER) || defined(HAVE_IBMDB2)
@@ -3143,7 +3143,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
SQLSMALLINT data_type;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pv_conn, &pv_data_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
data_type = (SQLSMALLINT) pv_data_type;
@@ -3204,7 +3204,7 @@ PHP_FUNCTION(odbc_primarykeys)
RETCODE rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs!ss", &pv_conn, &cat, &cat_len, &schema, &schema_len, &table, &table_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -3272,7 +3272,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len,
&proc, &proc_len, &col, &col_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -3341,7 +3341,7 @@ PHP_FUNCTION(odbc_procedures)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!ss", &pv_conn, &cat, &cat_len, &schema, &schema_len, &proc, &proc_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
@@ -3407,7 +3407,7 @@ PHP_FUNCTION(odbc_specialcolumns)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssl", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len,
&name, &name_len, &vscope, &vnullable) == FAILURE) {
- return;
+ RETURN_THROWS();
}
type = (SQLUSMALLINT) vtype;
@@ -3479,7 +3479,7 @@ PHP_FUNCTION(odbc_statistics)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs!ssll", &pv_conn, &cat, &cat_len, &schema, &schema_len,
&name, &name_len, &vunique, &vreserved) == FAILURE) {
- return;
+ RETURN_THROWS();
}
unique = (SQLUSMALLINT) vunique;
@@ -3547,7 +3547,7 @@ PHP_FUNCTION(odbc_tableprivileges)
RETCODE rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs!ss", &pv_conn, &cat, &cat_len, &schema, &schema_len, &table, &table_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_conn), "ODBC-Link", le_conn, le_pconn))) {
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 3ee2936d14..c3bb66bdb1 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -585,7 +585,7 @@ static ZEND_FUNCTION(opcache_get_status)
zend_bool fetch_scripts = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &fetch_scripts) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!validate_api_restriction()) {
@@ -717,7 +717,7 @@ static ZEND_FUNCTION(opcache_get_configuration)
zval directives, version, blacklist;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!validate_api_restriction()) {
@@ -809,7 +809,7 @@ static ZEND_FUNCTION(opcache_get_configuration)
static ZEND_FUNCTION(opcache_reset)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!validate_api_restriction()) {
@@ -840,7 +840,7 @@ static ZEND_FUNCTION(opcache_invalidate)
zend_bool force = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &script_name, &script_name_len, &force) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!validate_api_restriction()) {
@@ -864,7 +864,7 @@ static ZEND_FUNCTION(opcache_compile_file)
uint32_t orig_compiler_options;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &script_name, &script_name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!accel_startup_ok) {
@@ -919,7 +919,7 @@ static ZEND_FUNCTION(opcache_is_script_cached)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &script_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(filename_is_in_cache(script_name));
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 9f59546650..0cce627fb0 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -1338,7 +1338,7 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
PHP_FUNCTION(openssl_get_cert_locations)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1457,7 +1457,7 @@ PHP_FUNCTION(openssl_x509_export_to_file)
size_t filename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zp|b", &zcert, &filename, &filename_len, &notext) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1513,7 +1513,7 @@ PHP_FUNCTION(openssl_spki_new)
const EVP_MD *mdtype;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &zpkey, &challenge, &challenge_len, &algo) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1606,7 +1606,7 @@ PHP_FUNCTION(openssl_spki_verify)
NETSCAPE_SPKI *spki = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &spkstr, &spkstr_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1667,7 +1667,7 @@ PHP_FUNCTION(openssl_spki_export)
BIO *out = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &spkstr, &spkstr_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1735,7 +1735,7 @@ PHP_FUNCTION(openssl_spki_export_challenge)
NETSCAPE_SPKI *spki = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &spkstr, &spkstr_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1777,7 +1777,7 @@ PHP_FUNCTION(openssl_x509_export)
BIO * bio_out;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz|b", &zcert, &zout, &notext) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -1852,7 +1852,7 @@ PHP_FUNCTION(openssl_x509_fingerprint)
zend_string *fingerprint;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|sb", &zcert, &method, &method_len, &raw_output) == FAILURE) {
- return;
+ RETURN_THROWS();
}
cert = php_openssl_x509_from_zval(zcert, 0, NULL);
@@ -1885,7 +1885,7 @@ PHP_FUNCTION(openssl_x509_check_private_key)
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zcert, &zkey) == FAILURE) {
- return;
+ RETURN_THROWS();
}
cert = php_openssl_x509_from_zval(zcert, 0, NULL);
if (cert == NULL) {
@@ -1916,7 +1916,7 @@ PHP_FUNCTION(openssl_x509_verify)
int err = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zcert, &zkey) == FAILURE) {
- return;
+ RETURN_THROWS();
}
cert = php_openssl_x509_from_zval(zcert, 0, NULL);
if (cert == NULL) {
@@ -2039,7 +2039,7 @@ PHP_FUNCTION(openssl_x509_parse)
char buf[256];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcert, &useshortnames) == FAILURE) {
- return;
+ RETURN_THROWS();
}
cert = php_openssl_x509_from_zval(zcert, 0, NULL);
if (cert == NULL) {
@@ -2280,7 +2280,7 @@ PHP_FUNCTION(openssl_x509_checkpurpose)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl|a!s", &zcert, &purpose, &zcainfo, &untrusted, &untrusted_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_LONG(-1);
@@ -2399,7 +2399,7 @@ PHP_FUNCTION(openssl_x509_read)
zend_resource *res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &cert) == FAILURE) {
- return;
+ RETURN_THROWS();
}
x509 = php_openssl_x509_from_zval(cert, 1, &res);
ZVAL_RES(return_value, res);
@@ -2419,7 +2419,7 @@ PHP_FUNCTION(openssl_x509_free)
X509 *cert;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &x509) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((cert = (X509 *)zend_fetch_resource(Z_RES_P(x509), "OpenSSL X.509", le_x509)) == NULL) {
RETURN_FALSE;
@@ -2512,7 +2512,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
STACK_OF(X509) *ca = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zpzs|a", &zcert, &filename, &filename_len, &zpkey, &pass, &pass_len, &args) == FAILURE)
- return;
+ RETURN_THROWS();
RETVAL_FALSE;
@@ -2606,8 +2606,9 @@ PHP_FUNCTION(openssl_pkcs12_export)
zval * item;
STACK_OF(X509) *ca = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzzs|a", &zcert, &zout, &zpkey, &pass, &pass_len, &args) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzzs|a", &zcert, &zout, &zpkey, &pass, &pass_len, &args) == FAILURE) {
+ RETURN_THROWS();
+ }
RETVAL_FALSE;
@@ -2688,8 +2689,9 @@ PHP_FUNCTION(openssl_pkcs12_read)
BIO * bio_in = NULL;
int i;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "szs", &zp12, &zp12_len, &zout, &pass, &pass_len) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "szs", &zp12, &zp12_len, &zout, &pass, &pass_len) == FAILURE) {
+ RETURN_THROWS();
+ }
RETVAL_FALSE;
@@ -3024,7 +3026,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
zend_resource *csr_resource;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rp|b", &zcsr, &filename, &filename_len, &notext) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -3074,7 +3076,7 @@ PHP_FUNCTION(openssl_csr_export)
zend_resource *csr_resource;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|b", &zcsr, &zout, &notext) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -3126,8 +3128,9 @@ PHP_FUNCTION(openssl_csr_sign)
int i;
struct php_x509_request req;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz!zl|a!l", &zcsr, &zcert, &zpkey, &num_days, &args, &serial) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz!zl|a!l", &zcsr, &zcert, &zpkey, &num_days, &args, &serial) == FAILURE) {
+ RETURN_THROWS();
+ }
RETVAL_FALSE;
PHP_SSL_REQ_INIT(&req);
@@ -3272,7 +3275,7 @@ PHP_FUNCTION(openssl_csr_new)
zend_resource *key_resource;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "az|a!a!", &dn, &out_pkey, &args, &attribs) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -3359,7 +3362,7 @@ PHP_FUNCTION(openssl_csr_get_subject)
X509_REQ * csr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcsr, &use_shortnames) == FAILURE) {
- return;
+ RETURN_THROWS();
}
csr = php_openssl_csr_from_zval(zcsr, 0, &csr_resource);
@@ -3391,7 +3394,7 @@ PHP_FUNCTION(openssl_csr_get_public_key)
EVP_PKEY *tpubkey;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcsr, &use_shortnames) == FAILURE) {
- return;
+ RETURN_THROWS();
}
orig_csr = php_openssl_csr_from_zval(zcsr, 0, &csr_resource);
@@ -4049,7 +4052,7 @@ PHP_FUNCTION(openssl_pkey_new)
zval *data;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a!", &args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -4270,7 +4273,7 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
const EVP_CIPHER * cipher;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zp|s!a!", &zpkey, &filename, &filename_len, &passphrase, &passphrase_len, &args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -4357,7 +4360,7 @@ PHP_FUNCTION(openssl_pkey_export)
const EVP_CIPHER * cipher;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz|s!a!", &zpkey, &out, &passphrase, &passphrase_len, &args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -4435,7 +4438,7 @@ PHP_FUNCTION(openssl_pkey_get_public)
zend_resource *res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &cert) == FAILURE) {
- return;
+ RETURN_THROWS();
}
pkey = php_openssl_evp_from_zval(cert, 1, NULL, 0, 1, &res);
if (pkey == NULL) {
@@ -4454,7 +4457,7 @@ PHP_FUNCTION(openssl_pkey_free)
EVP_PKEY *pkey;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) {
RETURN_FALSE;
@@ -4474,7 +4477,7 @@ PHP_FUNCTION(openssl_pkey_get_private)
zend_resource *res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s", &cert, &passphrase, &passphrase_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
@@ -4501,7 +4504,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
zend_long ktype;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) {
RETURN_FALSE;
@@ -4677,7 +4680,7 @@ PHP_FUNCTION(openssl_dh_compute_key)
int len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sr", &pub_str, &pub_len, &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) {
RETURN_FALSE;
@@ -4723,7 +4726,7 @@ PHP_FUNCTION(openssl_pkey_derive)
zend_string *result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz|l", &peer_pub_key, &priv_key, &key_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (key_len < 0) {
php_error_docref(NULL, E_WARNING, "keylen < 0, assuming NULL");
@@ -4778,7 +4781,7 @@ PHP_FUNCTION(openssl_pbkdf2)
&salt, &salt_len,
&key_length, &iterations,
&method, &method_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (key_length <= 0) {
@@ -4843,7 +4846,7 @@ PHP_FUNCTION(openssl_pkcs7_verify)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pl|pappp", &filename, &filename_len,
&flags, &signersfilename, &signersfilename_len, &cainfo,
&extracerts, &extracerts_len, &datafilename, &datafilename_len, &p7bfilename, &p7bfilename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (extracerts) {
@@ -4988,8 +4991,9 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ppza!|ll", &infilename, &infilename_len,
- &outfilename, &outfilename_len, &zrecipcerts, &zheaders, &flags, &cipherid) == FAILURE)
- return;
+ &outfilename, &outfilename_len, &zrecipcerts, &zheaders, &flags, &cipherid) == FAILURE) {
+ RETURN_THROWS();
+ }
if (php_openssl_open_base_dir_chk(infilename) || php_openssl_open_base_dir_chk(outfilename)) {
@@ -5118,7 +5122,7 @@ PHP_FUNCTION(openssl_pkcs7_read)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &p7b, &p7b_len,
&zout) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5232,7 +5236,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
&infilename, &infilename_len, &outfilename, &outfilename_len,
&zcert, &zprivkey, &zheaders, &flags, &extracertsfilename,
&extracertsfilename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5347,7 +5351,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ppz|z", &infilename, &infilename_len,
&outfilename, &outfilename_len, &recipcert, &recipkey) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5423,7 +5427,7 @@ PHP_FUNCTION(openssl_private_encrypt)
zend_long padding = RSA_PKCS1_PADDING;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5487,7 +5491,7 @@ PHP_FUNCTION(openssl_private_decrypt)
size_t data_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5556,8 +5560,9 @@ PHP_FUNCTION(openssl_public_encrypt)
char * data;
size_t data_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
+ RETURN_THROWS();
+ }
RETVAL_FALSE;
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, 0, &keyresource);
@@ -5620,7 +5625,7 @@ PHP_FUNCTION(openssl_public_decrypt)
size_t data_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_FALSE;
@@ -5685,7 +5690,7 @@ PHP_FUNCTION(openssl_error_string)
unsigned long val;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_openssl_store_errors();
@@ -5723,7 +5728,7 @@ PHP_FUNCTION(openssl_sign)
const EVP_MD *mdtype;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|z", &data, &data_len, &signature, &key, &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
pkey = php_openssl_evp_from_zval(key, 0, "", 0, 0, &keyresource);
if (pkey == NULL) {
@@ -5791,7 +5796,7 @@ PHP_FUNCTION(openssl_verify)
zend_long signature_algo = OPENSSL_ALGO_SHA1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssz|z", &data, &data_len, &signature, &signature_len, &key, &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_OPENSSL_CHECK_SIZE_T_TO_UINT(signature_len, signature);
@@ -5855,7 +5860,7 @@ PHP_FUNCTION(openssl_seal)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szza|sz", &data, &data_len,
&sealdata, &ekeys, &pubkeys, &method, &method_len, &iv) == FAILURE) {
- return;
+ RETURN_THROWS();
}
pubkeysht = Z_ARRVAL_P(pubkeys);
nkeys = pubkeysht ? zend_hash_num_elements(pubkeysht) : 0;
@@ -5991,7 +5996,7 @@ PHP_FUNCTION(openssl_open)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szsz|ss", &data, &data_len, &opendata,
&ekey, &ekey_len, &privkey, &method, &method_len, &iv, &iv_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
pkey = php_openssl_evp_from_zval(privkey, 0, "", 0, 0, &keyresource);
@@ -6074,7 +6079,7 @@ PHP_FUNCTION(openssl_get_md_methods)
zend_bool aliases = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH,
@@ -6090,7 +6095,7 @@ PHP_FUNCTION(openssl_get_cipher_methods)
zend_bool aliases = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
@@ -6110,7 +6115,7 @@ PHP_FUNCTION(openssl_get_curve_names)
size_t len = EC_get_builtin_curves(NULL, 0);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
curves = emalloc(sizeof(EC_builtin_curve) * len);
@@ -6143,7 +6148,7 @@ PHP_FUNCTION(openssl_digest)
zend_string *sigbuf;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &data, &data_len, &method, &method_len, &raw_output) == FAILURE) {
- return;
+ RETURN_THROWS();
}
mdtype = EVP_get_digestbyname(method);
if (!mdtype) {
@@ -6481,7 +6486,7 @@ PHP_FUNCTION(openssl_encrypt)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|lszsl", &data, &data_len, &method, &method_len,
&password, &password_len, &options, &iv, &iv_len, &tag, &aad, &aad_len, &tag_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ret = php_openssl_encrypt(data, data_len, method, method_len, password, password_len, options, iv, iv_len, tag, tag_len, aad, aad_len))) {
@@ -6575,7 +6580,7 @@ PHP_FUNCTION(openssl_decrypt)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|lsss", &data, &data_len, &method, &method_len,
&password, &password_len, &options, &iv, &iv_len, &tag, &tag_len, &aad, &aad_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!method_len) {
@@ -6612,7 +6617,7 @@ PHP_FUNCTION(openssl_cipher_iv_length)
zend_long ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &method, &method_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!method_len) {
@@ -6674,7 +6679,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
zval *zstrong_result_returned = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z", &buffer_length, &zstrong_result_returned) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zstrong_result_returned) {
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 84bd933de8..70a9fec402 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -523,7 +523,7 @@ PHP_FUNCTION(pcntl_fork)
pid_t id;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = fork();
@@ -543,7 +543,7 @@ PHP_FUNCTION(pcntl_alarm)
zend_long seconds;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &seconds) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG((zend_long) alarm(seconds));
@@ -596,7 +596,7 @@ PHP_FUNCTION(pcntl_waitpid)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|lz", &pid, &z_status, &options, &z_rusage) == FAILURE) {
- return;
+ RETURN_THROWS();
}
status = zval_get_long(z_status);
@@ -646,7 +646,7 @@ PHP_FUNCTION(pcntl_wait)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|lz", &z_status, &options, &z_rusage) == FAILURE) {
- return;
+ RETURN_THROWS();
}
status = zval_get_long(z_status);
@@ -695,7 +695,7 @@ PHP_FUNCTION(pcntl_wifexited)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WIFEXITED
@@ -716,7 +716,7 @@ PHP_FUNCTION(pcntl_wifstopped)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WIFSTOPPED
@@ -737,7 +737,7 @@ PHP_FUNCTION(pcntl_wifsignaled)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WIFSIGNALED
@@ -757,7 +757,7 @@ PHP_FUNCTION(pcntl_wifcontinued)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef HAVE_WCONTINUED
@@ -778,7 +778,7 @@ PHP_FUNCTION(pcntl_wexitstatus)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WEXITSTATUS
@@ -797,7 +797,7 @@ PHP_FUNCTION(pcntl_wtermsig)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WTERMSIG
@@ -816,7 +816,7 @@ PHP_FUNCTION(pcntl_wstopsig)
zend_long status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#ifdef WSTOPSIG
@@ -846,7 +846,7 @@ PHP_FUNCTION(pcntl_exec)
zend_ulong key_num;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|aa", &path, &path_len, &args, &envs) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 1) {
@@ -945,7 +945,7 @@ PHP_FUNCTION(pcntl_signal)
char *error = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|b!", &signo, &handle, &restart_syscalls, &restart_syscalls_is_null) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (signo < 1 || signo >= NSIG) {
@@ -1019,7 +1019,7 @@ PHP_FUNCTION(pcntl_signal_get_handler)
zend_long signo;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &signo) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (signo < 1 || signo > 32) {
@@ -1039,7 +1039,7 @@ PHP_FUNCTION(pcntl_signal_get_handler)
PHP_FUNCTION(pcntl_signal_dispatch)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
pcntl_signal_dispatch();
@@ -1057,7 +1057,7 @@ PHP_FUNCTION(pcntl_sigprocmask)
sigset_t set, oldset;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "la|z", &how, &user_set, &user_oldset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sigemptyset(&set) != 0 || sigemptyset(&oldset) != 0) {
@@ -1113,11 +1113,11 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
if (timedwait) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|zll", &user_set, &user_siginfo, &tv_sec, &tv_nsec) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|z", &user_set, &user_siginfo) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1243,7 +1243,7 @@ PHP_FUNCTION(pcntl_getpriority)
int pri;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ll", &pid, &who) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* needs to be cleared, since any returned value is valid */
@@ -1282,7 +1282,7 @@ PHP_FUNCTION(pcntl_setpriority)
zend_long pri;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|ll", &pri, &pid, &who) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (setpriority(who, pid, pri)) {
@@ -1317,7 +1317,7 @@ PHP_FUNCTION(pcntl_setpriority)
PHP_FUNCTION(pcntl_get_last_error)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(PCNTL_G(last_error));
@@ -1331,7 +1331,7 @@ PHP_FUNCTION(pcntl_strerror)
zend_long error;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &error) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(strerror(error));
@@ -1450,7 +1450,7 @@ PHP_FUNCTION(pcntl_async_signals)
RETURN_BOOL(PCNTL_G(async_signals));
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &on) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_BOOL(PCNTL_G(async_signals));
PCNTL_G(async_signals) = on;
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index cba264ef63..44c99430c5 100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -86,7 +86,7 @@ PHP_FUNCTION(pdo_drivers)
pdo_driver_t *pdriver;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 2a8eb6c6d4..22292181b4 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -561,7 +561,7 @@ static PHP_METHOD(PDO, beginTransaction)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -594,7 +594,7 @@ static PHP_METHOD(PDO, commit)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -620,7 +620,7 @@ static PHP_METHOD(PDO, rollBack)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -646,7 +646,7 @@ static PHP_METHOD(PDO, inTransaction)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -970,7 +970,7 @@ static PHP_METHOD(PDO, errorCode)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -1001,7 +1001,7 @@ static PHP_METHOD(PDO, errorInfo)
pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
PDO_CONSTRUCT_CHECK;
@@ -1052,12 +1052,12 @@ static PHP_METHOD(PDO, query)
/* Return a meaningful error when no parameters were passed */
if (!ZEND_NUM_ARGS()) {
zend_parse_parameters(0, "z|z", NULL, NULL);
- return;
+ RETURN_THROWS();
}
if (FAILURE == zend_parse_parameters(1, "s", &statement,
&statement_len)) {
- return;
+ RETURN_THROWS();
}
PDO_DBH_CLEAR_ERR();
@@ -1161,7 +1161,7 @@ static PHP_METHOD(PDO, getAvailableDrivers)
pdo_driver_t *pdriver;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 2a702836c5..0b138df9ef 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -1570,7 +1570,7 @@ static PHP_METHOD(PDOStatement, errorCode)
PHP_STMT_GET_OBJ;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (stmt->error_code[0] == '\0') {
@@ -1592,7 +1592,7 @@ static PHP_METHOD(PDOStatement, errorInfo)
PHP_STMT_GET_OBJ;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1705,7 +1705,7 @@ static PHP_METHOD(PDOStatement, columnCount)
{
PHP_STMT_GET_OBJ;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(stmt->column_count);
}
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 6d2433a875..e91dc8aecd 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -546,7 +546,7 @@ static PHP_METHOD(PDO, pgsqlCopyFromArray)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sa|sss",
&table_name, &table_name_len, &pg_rows,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!zend_hash_num_elements(Z_ARRVAL_P(pg_rows))) {
@@ -658,7 +658,7 @@ static PHP_METHOD(PDO, pgsqlCopyFromFile)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sp|sss",
&table_name, &table_name_len, &filename, &filename_len,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Obtain db Handler */
@@ -759,7 +759,7 @@ static PHP_METHOD(PDO, pgsqlCopyToFile)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sp|sss",
&table_name, &table_name_len, &filename, &filename_len,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
dbh = Z_PDO_DBH_P(ZEND_THIS);
@@ -852,7 +852,7 @@ static PHP_METHOD(PDO, pgsqlCopyToArray)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sss",
&table_name, &table_name_len,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
dbh = Z_PDO_DBH_P(ZEND_THIS);
@@ -958,7 +958,7 @@ static PHP_METHOD(PDO, pgsqlLOBOpen)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|s",
&oidstr, &oidstrlen, &modestr, &modestrlen)) {
- return;
+ RETURN_THROWS();
}
oid = (Oid)strtoul(oidstr, &end_ptr, 10);
@@ -1005,7 +1005,7 @@ static PHP_METHOD(PDO, pgsqlLOBUnlink)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&oidstr, &oidlen)) {
- return;
+ RETURN_THROWS();
}
oid = (Oid)strtoul(oidstr, &end_ptr, 10);
@@ -1041,7 +1041,7 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "|ll",
&result_type, &ms_timeout)) {
- return;
+ RETURN_THROWS();
}
dbh = Z_PDO_DBH_P(ZEND_THIS);
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index e4d66c9791..c95f47770c 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1549,7 +1549,7 @@ PHP_FUNCTION(pg_connect_poll)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -1578,7 +1578,7 @@ PHP_FUNCTION(pg_close)
zend_resource *link;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!pgsql_link) {
@@ -1624,7 +1624,7 @@ static void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type
char *result;
if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc == 0) {
@@ -1844,13 +1844,13 @@ PHP_FUNCTION(pg_query)
if (argc == 1) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pgsql_link, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -1947,13 +1947,13 @@ PHP_FUNCTION(pg_query_params)
if (argc == 2) {
if (zend_parse_parameters(argc, "sa", &query, &query_len, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rsa", &pgsql_link, &query, &query_len, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -2063,13 +2063,13 @@ PHP_FUNCTION(pg_prepare)
if (argc == 2) {
if (zend_parse_parameters(argc, "ss", &stmtname, &stmtname_len, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rss", &pgsql_link, &stmtname, &stmtname_len, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -2150,13 +2150,13 @@ PHP_FUNCTION(pg_execute)
if (argc == 2) {
if (zend_parse_parameters(argc, "sa", &stmtname, &stmtname_len, &pv_param_arr)==FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rsa", &pgsql_link, &stmtname, &stmtname_len, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -2255,7 +2255,7 @@ static void php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_ty
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -2321,7 +2321,7 @@ PHP_FUNCTION(pg_last_notice)
zend_long option = PGSQL_NOTICE_LAST;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pgsql_link, &option) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Just to check if user passed valid resoruce */
@@ -2440,7 +2440,7 @@ PHP_FUNCTION(pg_field_table)
zend_resource *field_table;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|b", &result, &fnum, &return_oid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -2533,7 +2533,7 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ
Oid oid;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &result, &field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -2625,7 +2625,7 @@ PHP_FUNCTION(pg_field_num)
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &result, &field, &field_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -2650,11 +2650,11 @@ PHP_FUNCTION(pg_fetch_result)
if (argc == 2) {
if (zend_parse_parameters(argc, "rz", &result, &field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(argc, "rlz", &result, &row, &field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -2723,7 +2723,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
zend_string *class_name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!Sz", &result, &zrow, &class_name, &ctor_params) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!class_name) {
ce = zend_standard_class_def;
@@ -2737,7 +2737,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
result_type = PGSQL_ASSOC;
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!l", &result, &zrow, &result_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
if (zrow == NULL) {
@@ -2911,7 +2911,7 @@ PHP_FUNCTION(pg_fetch_all)
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &result, &result_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(result_type & PGSQL_BOTH)) {
@@ -2944,7 +2944,7 @@ PHP_FUNCTION(pg_fetch_all_columns)
size_t num_fields;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &result, &colno) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -2984,7 +2984,7 @@ PHP_FUNCTION(pg_result_seek)
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &result, &row) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -3016,11 +3016,11 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
if (argc == 2) {
if (zend_parse_parameters(argc, "rz", &result, &field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(argc, "rlz", &result, &row, &field) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -3099,7 +3099,7 @@ PHP_FUNCTION(pg_free_result)
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -3123,7 +3123,7 @@ PHP_FUNCTION(pg_last_oid)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
@@ -3161,7 +3161,7 @@ PHP_FUNCTION(pg_trace)
zend_resource *link;
if (zend_parse_parameters(argc, "p|sr", &z_filename, &z_filename_len, &mode, &mode_len, &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc < 3) {
@@ -3201,7 +3201,7 @@ PHP_FUNCTION(pg_untrace)
zend_resource *link;
if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc == 0) {
@@ -3231,7 +3231,7 @@ PHP_FUNCTION(pg_lo_create)
zend_resource *link;
if (zend_parse_parameters(argc, "|zz", &pgsql_link, &oid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((argc == 1) && (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) {
@@ -3498,7 +3498,7 @@ PHP_FUNCTION(pg_lo_close)
pgLofp *pgsql;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_lofp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_lofp), "PostgreSQL large object", le_lofp)) == NULL) {
@@ -3531,7 +3531,7 @@ PHP_FUNCTION(pg_lo_read)
pgLofp *pgsql;
if (zend_parse_parameters(argc, "r|l", &pgsql_id, &len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp)) == NULL) {
@@ -3567,7 +3567,7 @@ PHP_FUNCTION(pg_lo_write)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rs|l", &pgsql_id, &str, &str_len, &z_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc > 2) {
@@ -3608,7 +3608,7 @@ PHP_FUNCTION(pg_lo_read_all)
pgLofp *pgsql;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_id) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp)) == NULL) {
@@ -3816,7 +3816,7 @@ PHP_FUNCTION(pg_lo_seek)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rl|l", &pgsql_id, &offset, &whence) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END) {
php_error_docref(NULL, E_WARNING, "Invalid whence parameter");
@@ -3854,7 +3854,7 @@ PHP_FUNCTION(pg_lo_tell)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "r", &pgsql_id) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp)) == NULL) {
@@ -3886,7 +3886,7 @@ PHP_FUNCTION(pg_lo_truncate)
int result;
if (zend_parse_parameters(argc, "rl", &pgsql_id, &size) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp)) == NULL) {
@@ -3924,13 +3924,13 @@ PHP_FUNCTION(pg_set_error_verbosity)
if (argc == 1) {
if (zend_parse_parameters(argc, "l", &verbosity) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rl", &pgsql_link, &verbosity) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -3962,13 +3962,13 @@ PHP_FUNCTION(pg_set_client_encoding)
if (argc == 1) {
if (zend_parse_parameters(argc, "s", &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rs", &pgsql_link, &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -3991,7 +3991,7 @@ PHP_FUNCTION(pg_client_encoding)
zend_resource *link;
if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc == 0) {
@@ -4027,7 +4027,7 @@ PHP_FUNCTION(pg_end_copy)
zend_resource *link;
if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (argc == 0) {
@@ -4064,13 +4064,13 @@ PHP_FUNCTION(pg_put_line)
if (argc == 1) {
if (zend_parse_parameters(argc, "s", &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
} else {
if (zend_parse_parameters(argc, "rs", &pgsql_link, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
}
@@ -4105,7 +4105,7 @@ PHP_FUNCTION(pg_copy_to)
if (zend_parse_parameters(argc, "rs|ss",
&pgsql_link, &table_name, &table_name_len,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -4243,7 +4243,7 @@ PHP_FUNCTION(pg_copy_from)
if (zend_parse_parameters(argc, "rsa|ss",
&pgsql_link, &table_name, &table_name_len, &pg_rows,
&pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -4375,13 +4375,13 @@ PHP_FUNCTION(pg_escape_string)
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &from) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
break;
default:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &pgsql_link, &from) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
break;
@@ -4421,13 +4421,13 @@ PHP_FUNCTION(pg_escape_bytea)
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &from, &from_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
break;
default:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pgsql_link, &from, &from_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
break;
@@ -4564,7 +4564,7 @@ PHP_FUNCTION(pg_unescape_bytea)
size_t from_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&from, &from_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
#if HAVE_PQUNESCAPEBYTEA
@@ -4596,7 +4596,7 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &from, &from_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
@@ -4604,7 +4604,7 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l
default:
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pgsql_link, &from, &from_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
link = Z_RES_P(pgsql_link);
break;
@@ -4898,7 +4898,7 @@ PHP_FUNCTION(pg_send_query)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pgsql_link, &query, &len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -4971,7 +4971,7 @@ PHP_FUNCTION(pg_send_query_params)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa", &pgsql_link, &query, &query_len, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5067,7 +5067,7 @@ PHP_FUNCTION(pg_send_prepare)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rss", &pgsql_link, &stmtname, &stmtname_len, &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5142,7 +5142,7 @@ PHP_FUNCTION(pg_send_execute)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa", &pgsql_link, &stmtname, &stmtname_len, &pv_param_arr) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5438,7 +5438,7 @@ PHP_FUNCTION(pg_socket)
PGconn *pgsql;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5464,7 +5464,7 @@ PHP_FUNCTION(pg_consume_input)
PGconn *pgsql;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5485,7 +5485,7 @@ PHP_FUNCTION(pg_flush)
int is_non_blocking;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5639,7 +5639,7 @@ PHP_FUNCTION(pg_meta_data)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|b",
&pgsql_link, &table_name, &table_name_len, &extended) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -6510,7 +6510,7 @@ PHP_FUNCTION(pg_convert)
if (zend_parse_parameters(ZEND_NUM_ARGS(),
"rsa|l", &pgsql_link, &table_name, &table_name_len, &values, &option) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option & ~PGSQL_CONV_OPTS) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
@@ -6723,7 +6723,7 @@ PHP_FUNCTION(pg_insert)
if (zend_parse_parameters(argc, "rsa|l",
&pgsql_link, &table, &table_len, &values, &option) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option & ~(PGSQL_CONV_OPTS|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_ASYNC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
@@ -6935,7 +6935,7 @@ PHP_FUNCTION(pg_update)
if (zend_parse_parameters(argc, "rsaa|l",
&pgsql_link, &table, &table_len, &values, &ids, &option) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option & ~(PGSQL_CONV_OPTS|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
@@ -7027,7 +7027,7 @@ PHP_FUNCTION(pg_delete)
if (zend_parse_parameters(argc, "rsa|l",
&pgsql_link, &table, &table_len, &ids, &option) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option & ~(PGSQL_CONV_FORCE_NULL|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
@@ -7168,7 +7168,7 @@ PHP_FUNCTION(pg_select)
if (zend_parse_parameters(argc, "rsa|l",
&pgsql_link, &table, &table_len, &ids, &option, &result_type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (option & ~(PGSQL_CONV_FORCE_NULL|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_ASYNC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index 404014f045..17ade203d5 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -37,7 +37,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|z", &filename, &filename_len, &zcontext) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) {
@@ -765,7 +765,7 @@ ZEND_NAMED_FUNCTION(fname) { \
size_t filename_len; \
\
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) { \
- return; \
+ RETURN_THROWS(); \
} \
\
phar_file_stat(filename, filename_len, funcnum, PHAR_G(orig), INTERNAL_FUNCTION_PARAM_PASSTHRU); \
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 56e5fd442c..f731a57031 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -399,7 +399,7 @@ PHP_METHOD(Phar, running)
zend_bool retphar = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &retphar) == FAILURE) {
- return;
+ RETURN_THROWS();
}
fname = (char*)zend_get_executed_filename();
@@ -441,7 +441,7 @@ PHP_METHOD(Phar, mount)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &path, &path_len, &actual, &actual_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
fname = (char*)zend_get_executed_filename();
@@ -554,7 +554,7 @@ PHP_METHOD(Phar, webPhar)
size_t sapi_mod_name_len = strlen(sapi_module.name);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s!saz", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite) == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_request_initialize();
@@ -883,7 +883,7 @@ PHP_METHOD(Phar, mungServer)
zval *mungvalues, *data;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &mungvalues) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!zend_hash_num_elements(Z_ARRVAL_P(mungvalues))) {
@@ -936,7 +936,7 @@ PHP_METHOD(Phar, mungServer)
PHP_METHOD(Phar, interceptFileFuncs)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_intercept_functions();
}
@@ -954,7 +954,7 @@ PHP_METHOD(Phar, createDefaultStub)
size_t index_len = 0, webindex_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|pp", &index, &index_len, &webindex, &webindex_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
stub = phar_create_default_stub(index, webindex, &error);
@@ -977,7 +977,7 @@ PHP_METHOD(Phar, mapPhar)
zend_long dataoffset = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!l", &alias, &alias_len, &dataoffset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_request_initialize();
@@ -998,7 +998,7 @@ PHP_METHOD(Phar, loadPhar)
size_t fname_len, alias_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!", &fname, &fname_len, &alias, &alias_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_request_initialize();
@@ -1016,7 +1016,7 @@ PHP_METHOD(Phar, loadPhar)
PHP_METHOD(Phar, apiVersion)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1);
}
@@ -1029,7 +1029,7 @@ PHP_METHOD(Phar, canCompress)
zend_long method = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_request_initialize();
@@ -1061,7 +1061,7 @@ PHP_METHOD(Phar, canCompress)
PHP_METHOD(Phar, canWrite)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(!PHAR_G(readonly));
}
@@ -1079,7 +1079,7 @@ PHP_METHOD(Phar, isValidPharFilename)
zend_bool executable = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) {
- return;
+ RETURN_THROWS();
}
is_executable = executable;
@@ -1147,11 +1147,11 @@ PHP_METHOD(Phar, __construct)
if (is_data) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls!l", &fname, &fname_len, &flags, &alias, &alias_len, &format) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls!", &fname, &fname_len, &flags, &alias, &alias_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1265,7 +1265,7 @@ PHP_METHOD(Phar, __construct)
PHP_METHOD(Phar, getSupportedSignatures)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1290,7 +1290,7 @@ PHP_METHOD(Phar, getSupportedSignatures)
PHP_METHOD(Phar, getSupportedCompression)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1317,7 +1317,7 @@ PHP_METHOD(Phar, unlinkArchive)
phar_archive_data *phar;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!fname_len) {
@@ -1390,7 +1390,7 @@ PHP_METHOD(Phar, __destruct)
phar_archive_object *phar_obj = (phar_archive_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive && phar_obj->archive->is_persistent) {
@@ -1737,7 +1737,7 @@ PHP_METHOD(Phar, buildFromDirectory)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &dir, &dir_len, &regex, &regex_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_UINT_OVFL(dir_len)) {
@@ -1873,7 +1873,7 @@ PHP_METHOD(Phar, buildFromIterator)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|s", &obj, zend_ce_traversable, &base, &base_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_UINT_OVFL(base_len)) {
@@ -1922,7 +1922,7 @@ PHP_METHOD(Phar, count)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &mode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(zend_hash_num_elements(&phar_obj->archive->manifest));
@@ -1939,7 +1939,7 @@ PHP_METHOD(Phar, isFileFormat)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (type) {
@@ -2382,7 +2382,7 @@ PHP_METHOD(Phar, convertToExecutable)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lls", &format, &method, &ext, &ext_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly)) {
@@ -2486,7 +2486,7 @@ PHP_METHOD(Phar, convertToData)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lls", &format, &method, &ext, &ext_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (format) {
@@ -2581,7 +2581,7 @@ PHP_METHOD(Phar, isCompressed)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->flags & PHAR_FILE_COMPRESSED_GZ) {
@@ -2605,7 +2605,7 @@ PHP_METHOD(Phar, isWritable)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!phar_obj->archive->is_writeable) {
@@ -2642,7 +2642,7 @@ PHP_METHOD(Phar, delete)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->archive))) {
@@ -2683,7 +2683,7 @@ PHP_METHOD(Phar, getAlias)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->alias && phar_obj->archive->alias != phar_obj->archive->fname) {
@@ -2700,7 +2700,7 @@ PHP_METHOD(Phar, getPath)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRINGL(phar_obj->archive->fname, phar_obj->archive->fname_len);
@@ -2817,7 +2817,7 @@ PHP_METHOD(Phar, getVersion)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(phar_obj->archive->version);
@@ -2832,7 +2832,7 @@ PHP_METHOD(Phar, startBuffering)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_obj->archive->donotflush = 1;
@@ -2847,7 +2847,7 @@ PHP_METHOD(Phar, isBuffering)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(phar_obj->archive->donotflush);
@@ -2864,7 +2864,7 @@ PHP_METHOD(Phar, stopBuffering)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
@@ -2986,7 +2986,7 @@ PHP_METHOD(Phar, setDefaultStub)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s", &index, &index_len, &webindex, &webindex_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 0 && (phar_obj->archive->is_tar || phar_obj->archive->is_zip)) {
@@ -3095,7 +3095,7 @@ PHP_METHOD(Phar, getSignature)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->signature) {
@@ -3138,7 +3138,7 @@ PHP_METHOD(Phar, getModified)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(phar_obj->archive->is_modified);
@@ -3217,7 +3217,7 @@ PHP_METHOD(Phar, compress)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|s", &method, &ext, &ext_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
@@ -3284,7 +3284,7 @@ PHP_METHOD(Phar, decompress)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &ext, &ext_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
@@ -3326,7 +3326,7 @@ PHP_METHOD(Phar, compressFiles)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
@@ -3400,7 +3400,7 @@ PHP_METHOD(Phar, decompressFiles)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
@@ -3451,7 +3451,7 @@ PHP_METHOD(Phar, copy)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
@@ -3550,7 +3550,7 @@ PHP_METHOD(Phar, offsetExists)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
@@ -3588,7 +3588,7 @@ PHP_METHOD(Phar, offsetGet)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* security is 0 here so that we can get a better error message than "entry doesn't exist" */
@@ -3772,7 +3772,7 @@ PHP_METHOD(Phar, offsetSet)
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "pr", &fname, &fname_len, &zresource) == FAILURE
&& zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &fname, &fname_len, &cont_str, &cont_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub.php")-1)) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot set stub \".phar/stub.php\" directly in phar \"%s\", use setStub", phar_obj->archive->fname);
@@ -3809,7 +3809,7 @@ PHP_METHOD(Phar, offsetUnset)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
@@ -3856,7 +3856,7 @@ PHP_METHOD(Phar, addEmptyDir)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &dirname, &dirname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (dirname_len >= sizeof(".phar")-1 && !memcmp(dirname, ".phar", sizeof(".phar")-1)) {
@@ -3881,7 +3881,7 @@ PHP_METHOD(Phar, addFile)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &fname, &fname_len, &localname, &localname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!strstr(fname, "://") && php_check_open_basedir(fname)) {
@@ -3916,7 +3916,7 @@ PHP_METHOD(Phar, addFromString)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &localname, &localname_len, &cont_str, &cont_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
phar_add_file(&(phar_obj->archive), localname, localname_len, cont_str, cont_len, NULL);
@@ -3937,7 +3937,7 @@ PHP_METHOD(Phar, getStub)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->is_tar || phar_obj->archive->is_zip) {
@@ -4030,7 +4030,7 @@ PHP_METHOD(Phar, hasMetadata)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(Z_TYPE(phar_obj->archive->metadata) != IS_UNDEF);
@@ -4045,7 +4045,7 @@ PHP_METHOD(Phar, getMetadata)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE(phar_obj->archive->metadata) != IS_UNDEF) {
@@ -4077,7 +4077,7 @@ PHP_METHOD(Phar, setMetadata)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &metadata) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (phar_obj->archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->archive))) {
@@ -4115,7 +4115,7 @@ PHP_METHOD(Phar, delMetadata)
}
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE(phar_obj->archive->metadata) != IS_UNDEF) {
@@ -4368,7 +4368,7 @@ PHP_METHOD(Phar, extractTo)
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|z!b", &pathto, &pathto_len, &zval_files, &overwrite) == FAILURE) {
- return;
+ RETURN_THROWS();
}
fp = php_stream_open_wrapper(phar_obj->archive->fname, "rb", IGNORE_URL|STREAM_MUST_SEEK, NULL);
@@ -4481,7 +4481,7 @@ PHP_METHOD(PharFileInfo, __construct)
zval *zobj = ZEND_THIS, arg1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset);
@@ -4570,7 +4570,7 @@ PHP_METHOD(PharFileInfo, getCompressedSize)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(entry_obj->entry->compressed_filesize);
@@ -4587,7 +4587,7 @@ PHP_METHOD(PharFileInfo, isCompressed)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (method) {
@@ -4612,7 +4612,7 @@ PHP_METHOD(PharFileInfo, getCRC32)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_dir) {
@@ -4638,7 +4638,7 @@ PHP_METHOD(PharFileInfo, isCRCChecked)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(entry_obj->entry->is_crc_checked);
@@ -4653,7 +4653,7 @@ PHP_METHOD(PharFileInfo, getPharFlags)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(entry_obj->entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK));
@@ -4681,7 +4681,7 @@ PHP_METHOD(PharFileInfo, chmod)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &perms) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_persistent) {
@@ -4731,7 +4731,7 @@ PHP_METHOD(PharFileInfo, hasMetadata)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(Z_TYPE(entry_obj->entry->metadata) != IS_UNDEF);
@@ -4746,7 +4746,7 @@ PHP_METHOD(PharFileInfo, getMetadata)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE(entry_obj->entry->metadata) != IS_UNDEF) {
@@ -4784,7 +4784,7 @@ PHP_METHOD(PharFileInfo, setMetadata)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &metadata) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_persistent) {
@@ -4825,7 +4825,7 @@ PHP_METHOD(PharFileInfo, delMetadata)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PHAR_G(readonly) && !entry_obj->entry->phar->is_data) {
@@ -4884,7 +4884,7 @@ PHP_METHOD(PharFileInfo, getContent)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_dir) {
@@ -4932,7 +4932,7 @@ PHP_METHOD(PharFileInfo, compress)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_tar) {
@@ -5058,7 +5058,7 @@ PHP_METHOD(PharFileInfo, decompress)
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (entry_obj->entry->is_dir) {
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 7e97f4ae69..787308d1ce 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -268,7 +268,7 @@ ZEND_TSRMLS_CACHE_DEFINE()
ZEND_GET_MODULE(posix)
#endif
-#define PHP_POSIX_NO_ARGS if (zend_parse_parameters_none() == FAILURE) return;
+#define PHP_POSIX_NO_ARGS if (zend_parse_parameters_none() == FAILURE) RETURN_THROWS();
#define PHP_POSIX_RETURN_LONG_FUNC(func_name) \
PHP_POSIX_NO_ARGS \
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index 36bca739cb..30f91dee4b 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -174,7 +174,7 @@ static PHP_FUNCTION(pspell_new)
if (zend_parse_parameters(argc, "s|sssl", &language, &language_len, &spelling, &spelling_len,
&jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
config = new_pspell_config();
@@ -271,7 +271,7 @@ static PHP_FUNCTION(pspell_new_personal)
if (zend_parse_parameters(argc, "ps|sssl", &personal, &personal_len, &language, &language_len,
&spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
config = new_pspell_config();
@@ -363,7 +363,7 @@ static PHP_FUNCTION(pspell_new_config)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &conf) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -392,7 +392,7 @@ static PHP_FUNCTION(pspell_check)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -417,7 +417,7 @@ static PHP_FUNCTION(pspell_suggest)
const char *sug;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -448,7 +448,7 @@ static PHP_FUNCTION(pspell_store_replacement)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lss", &scin, &miss, &miss_len, &corr, &corr_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -473,7 +473,7 @@ static PHP_FUNCTION(pspell_add_to_personal)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -503,7 +503,7 @@ static PHP_FUNCTION(pspell_add_to_session)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -531,7 +531,7 @@ static PHP_FUNCTION(pspell_clear_session)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &scin) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -554,7 +554,7 @@ static PHP_FUNCTION(pspell_save_wordlist)
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &scin) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_MANAGER;
@@ -590,7 +590,7 @@ static PHP_FUNCTION(pspell_config_create)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sss", &language, &language_len, &spelling, &spelling_len,
&jargon, &jargon_len, &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
config = new_pspell_config();
@@ -648,7 +648,7 @@ static PHP_FUNCTION(pspell_config_runtogether)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &conf, &runtogether) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -667,7 +667,7 @@ static PHP_FUNCTION(pspell_config_mode)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &conf, &mode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -694,7 +694,7 @@ static PHP_FUNCTION(pspell_config_ignore)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &conf, &ignore) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -714,7 +714,7 @@ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lp", &conf, &value, &value_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -762,7 +762,7 @@ static PHP_FUNCTION(pspell_config_repl)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lp", &conf, &repl, &repl_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
@@ -788,7 +788,7 @@ static PHP_FUNCTION(pspell_config_save_repl)
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &conf, &save) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PSPELL_FETCH_CONFIG;
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 4445bd6f02..77d3855498 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -160,7 +160,7 @@ PHP_FUNCTION(readline)
char *result;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "|s!", &prompt, &prompt_len)) {
- return;
+ RETURN_THROWS();
}
result = readline(prompt);
@@ -187,7 +187,7 @@ PHP_FUNCTION(readline_info)
char *oldstr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sz", &what, &what_len, &value) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!what) {
@@ -317,7 +317,7 @@ PHP_FUNCTION(readline_add_history)
size_t arg_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &arg, &arg_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
add_history(arg);
@@ -331,7 +331,7 @@ PHP_FUNCTION(readline_add_history)
PHP_FUNCTION(readline_clear_history)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
#if HAVE_LIBEDIT
@@ -354,7 +354,7 @@ PHP_FUNCTION(readline_list_history)
HIST_ENTRY **history;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -409,7 +409,7 @@ PHP_FUNCTION(readline_read_history)
size_t arg_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|p", &arg, &arg_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (arg && php_check_open_basedir(arg)) {
@@ -434,7 +434,7 @@ PHP_FUNCTION(readline_write_history)
size_t arg_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|p", &arg, &arg_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (arg && php_check_open_basedir(arg)) {
@@ -522,7 +522,7 @@ PHP_FUNCTION(readline_completion_function)
zval *arg;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg)) {
- return;
+ RETURN_THROWS();
}
if (!zend_is_callable(arg, 0, NULL)) {
@@ -570,7 +570,7 @@ PHP_FUNCTION(readline_callback_handler_install)
size_t prompt_len;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &prompt, &prompt_len, &callback)) {
- return;
+ RETURN_THROWS();
}
if (!zend_is_callable(callback, 0, NULL)) {
@@ -598,7 +598,7 @@ PHP_FUNCTION(readline_callback_handler_install)
PHP_FUNCTION(readline_callback_read_char)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
@@ -612,7 +612,7 @@ PHP_FUNCTION(readline_callback_read_char)
PHP_FUNCTION(readline_callback_handler_remove)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
@@ -630,7 +630,7 @@ PHP_FUNCTION(readline_callback_handler_remove)
PHP_FUNCTION(readline_redisplay)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
#if HAVE_LIBEDIT
@@ -650,7 +650,7 @@ PHP_FUNCTION(readline_redisplay)
PHP_FUNCTION(readline_on_new_line)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
rl_on_new_line();
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 8ee410e0e0..1415b407a5 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -45,7 +45,7 @@ PHP_METHOD(SessionHandler, open)
PS_SANITY_CHECK;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &save_path, &save_path_len, &session_name, &session_name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PS(mod_user_is_open) = 1;
@@ -96,7 +96,7 @@ PHP_METHOD(SessionHandler, read)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(default_mod)->s_read(&PS(mod_data), key, &val, PS(gc_maxlifetime)) == FAILURE) {
@@ -116,7 +116,7 @@ PHP_METHOD(SessionHandler, write)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val, PS(gc_maxlifetime)));
@@ -132,7 +132,7 @@ PHP_METHOD(SessionHandler, destroy)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(SUCCESS == PS(default_mod)->s_destroy(&PS(mod_data), key));
@@ -149,7 +149,7 @@ PHP_METHOD(SessionHandler, gc)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &maxlifetime) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels) == FAILURE) {
@@ -168,7 +168,7 @@ PHP_METHOD(SessionHandler, create_sid)
PS_SANITY_CHECK;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = PS(default_mod)->s_create_sid(&PS(mod_data));
@@ -186,7 +186,7 @@ PHP_METHOD(SessionHandler, validateId)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Legacy save handler may not support validate_sid API. Return TRUE. */
@@ -203,7 +203,7 @@ PHP_METHOD(SessionHandler, updateTimestamp)
PS_SANITY_CHECK_IS_OPEN;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* Legacy save handler may not support update_timestamp API. Just write. */
diff --git a/ext/session/session.c b/ext/session/session.c
index 83e5ff4105..0b95af0232 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1828,7 +1828,7 @@ cleanup:
static PHP_FUNCTION(session_get_cookie_params)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1850,7 +1850,7 @@ static PHP_FUNCTION(session_name)
zend_string *ini_name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name && PS(session_status) == php_session_active) {
@@ -1881,7 +1881,7 @@ static PHP_FUNCTION(session_module_name)
zend_string *ini_name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name && PS(session_status) == php_session_active) {
@@ -1945,7 +1945,7 @@ static PHP_FUNCTION(session_set_save_handler)
zend_bool register_shutdown = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, php_session_iface_entry, &register_shutdown) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* For compatibility reason, implemented interface is not checked */
@@ -2047,7 +2047,7 @@ static PHP_FUNCTION(session_set_save_handler)
}
if (zend_parse_parameters(argc, "+", &args, &num_args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* remove shutdown function */
@@ -2092,7 +2092,7 @@ static PHP_FUNCTION(session_save_path)
zend_string *ini_name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name && PS(session_status) == php_session_active) {
@@ -2128,7 +2128,7 @@ static PHP_FUNCTION(session_id)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "|S", &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name && PS(use_cookies) && SG(headers_sent)) {
@@ -2171,7 +2171,7 @@ static PHP_FUNCTION(session_regenerate_id)
zend_string *data;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2272,7 +2272,7 @@ static PHP_FUNCTION(session_create_id)
smart_str id = {0};
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &prefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (prefix && ZSTR_LEN(prefix)) {
@@ -2325,7 +2325,7 @@ static PHP_FUNCTION(session_cache_limiter)
zend_string *ini_name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &limiter) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (limiter && PS(session_status) == php_session_active) {
@@ -2356,7 +2356,7 @@ static PHP_FUNCTION(session_cache_expire)
zend_bool expires_is_null = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!expires_is_null && PS(session_status) == php_session_active) {
@@ -2388,7 +2388,7 @@ static PHP_FUNCTION(session_encode)
zend_string *enc;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
enc = php_session_encode();
@@ -2407,7 +2407,7 @@ static PHP_FUNCTION(session_decode)
zend_string *str = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2445,7 +2445,7 @@ static PHP_FUNCTION(session_start)
zend_long read_and_close = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a", &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) == php_session_active) {
@@ -2517,7 +2517,7 @@ static PHP_FUNCTION(session_start)
static PHP_FUNCTION(session_destroy)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(php_session_destroy() == SUCCESS);
@@ -2529,7 +2529,7 @@ static PHP_FUNCTION(session_destroy)
static PHP_FUNCTION(session_unset)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2554,7 +2554,7 @@ static PHP_FUNCTION(session_gc)
zend_long num;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2577,7 +2577,7 @@ static PHP_FUNCTION(session_gc)
static PHP_FUNCTION(session_write_close)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2593,7 +2593,7 @@ static PHP_FUNCTION(session_write_close)
static PHP_FUNCTION(session_abort)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2609,7 +2609,7 @@ static PHP_FUNCTION(session_abort)
static PHP_FUNCTION(session_reset)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (PS(session_status) != php_session_active) {
@@ -2625,7 +2625,7 @@ static PHP_FUNCTION(session_reset)
static PHP_FUNCTION(session_status)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(PS(session_status));
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 4f47372f31..ff33683a28 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -121,7 +121,7 @@ PHP_FUNCTION(shmop_open)
size_t flags_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lsll", &key, &flags, &flags_len, &mode, &size) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (flags_len != 1) {
@@ -203,7 +203,7 @@ PHP_FUNCTION(shmop_read)
zend_string *return_string;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll", &shmid, &start, &count) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((shmop = (struct php_shmop *)zend_fetch_resource(Z_RES_P(shmid), "shmop", shm_type)) == NULL) {
@@ -237,7 +237,7 @@ PHP_FUNCTION(shmop_close)
struct php_shmop *shmop;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &shmid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
@@ -257,7 +257,7 @@ PHP_FUNCTION(shmop_size)
struct php_shmop *shmop;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &shmid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((shmop = (struct php_shmop *)zend_fetch_resource(Z_RES_P(shmid), "shmop", shm_type)) == NULL) {
@@ -279,7 +279,7 @@ PHP_FUNCTION(shmop_write)
zval *shmid;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSl", &shmid, &data, &offset) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((shmop = (struct php_shmop *)zend_fetch_resource(Z_RES_P(shmid), "shmop", shm_type)) == NULL) {
@@ -311,7 +311,7 @@ PHP_FUNCTION(shmop_delete)
struct php_shmop *shmop;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &shmid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((shmop = (struct php_shmop *)zend_fetch_resource(Z_RES_P(shmid), "shmop", shm_type)) == NULL) {
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 5af1b21844..f7820ddb31 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1320,7 +1320,7 @@ SXE_METHOD(xpath)
xmlNodePtr nodeptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &query, &query_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1405,7 +1405,7 @@ SXE_METHOD(registerXPathNamespace)
char *prefix, *ns_uri;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1434,7 +1434,7 @@ SXE_METHOD(asXML)
size_t filename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|p", &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1556,7 +1556,7 @@ SXE_METHOD(getNamespaces)
xmlNodePtr node;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &recursive) == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -1605,7 +1605,7 @@ SXE_METHOD(getDocNamespaces)
xmlNodePtr node;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|bb", &recursive, &from_root) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1635,7 +1635,7 @@ SXE_METHOD(children)
zend_bool isprefix = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1661,7 +1661,7 @@ SXE_METHOD(getName)
int namelen;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1688,7 +1688,7 @@ SXE_METHOD(attributes)
zend_bool isprefix = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1717,7 +1717,7 @@ SXE_METHOD(addChild)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s!s!",
&qname, &qname_len, &value, &value_len, &nsuri, &nsuri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (qname_len == 0) {
@@ -1783,7 +1783,7 @@ SXE_METHOD(addAttribute)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|s!",
&qname, &qname_len, &value, &value_len, &nsuri, &nsuri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (qname_len == 0) {
@@ -1944,7 +1944,7 @@ static int sxe_object_cast(zend_object *readobj, zval *writeobj, int type)
SXE_METHOD(__toString)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sxe_object_cast_ex(Z_OBJ_P(ZEND_THIS), return_value, IS_STRING) != SUCCESS) {
@@ -2007,7 +2007,7 @@ SXE_METHOD(count)
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_sxe_count_elements_helper(sxe, &count);
@@ -2182,7 +2182,7 @@ PHP_FUNCTION(simplexml_load_file)
zend_bool isprefix = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|C!lsb", &filename, &filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_LONG_EXCEEDS_INT(options)) {
@@ -2228,7 +2228,7 @@ PHP_FUNCTION(simplexml_load_string)
zend_bool isprefix = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|C!lsb", &data, &data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_INT_OVFL(data_len)) {
@@ -2278,7 +2278,7 @@ SXE_METHOD(__construct)
zend_bool is_url = 0, isprefix = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lbsb", &data, &data_len, &options, &is_url, &ns, &ns_len, &isprefix) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_INT_OVFL(data_len)) {
@@ -2531,7 +2531,7 @@ PHP_FUNCTION(simplexml_import_dom)
zend_function *fptr_count;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|C!", &node, &ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
object = Z_LIBXML_NODE_P(node);
diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c
index c8fce2ccde..8c9d050dcb 100644
--- a/ext/simplexml/sxe.c
+++ b/ext/simplexml/sxe.c
@@ -39,7 +39,7 @@ PHP_SXE_API zend_class_entry *ce_SimpleXMLElement;
PHP_METHOD(ce_SimpleXMLIterator, rewind)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_sxe_rewind_iterator(Z_SXEOBJ_P(ZEND_THIS));
@@ -53,7 +53,7 @@ PHP_METHOD(ce_SimpleXMLIterator, valid)
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(!Z_ISUNDEF(sxe->iter.data));
@@ -68,7 +68,7 @@ PHP_METHOD(ce_SimpleXMLIterator, current)
zval *data;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_ISUNDEF(sxe->iter.data)) {
@@ -89,7 +89,7 @@ PHP_METHOD(ce_SimpleXMLIterator, key)
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_ISUNDEF(sxe->iter.data)) {
@@ -111,7 +111,7 @@ PHP_METHOD(ce_SimpleXMLIterator, key)
PHP_METHOD(ce_SimpleXMLIterator, next)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_sxe_move_forward_iterator(Z_SXEOBJ_P(ZEND_THIS));
@@ -127,7 +127,7 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren)
xmlNodePtr node;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_ISUNDEF(sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
@@ -154,7 +154,7 @@ PHP_METHOD(ce_SimpleXMLIterator, getChildren)
zval *data;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_ISUNDEF(sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 1e58809baf..530cd80d75 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1158,7 +1158,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
if (st & SNMP_CMD_SET) {
if (zend_parse_parameters(argc, "ssssssszzz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
/* SNMP_CMD_GET
@@ -1167,13 +1167,13 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
*/
if (zend_parse_parameters(argc, "sssssssz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &timeout, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
} else {
if (st & SNMP_CMD_SET) {
if (zend_parse_parameters(argc, "sszzz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
/* SNMP_CMD_GET
@@ -1181,25 +1181,25 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
* SNMP_CMD_WALK
*/
if (zend_parse_parameters(argc, "ssz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &timeout, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
}
} else {
if (st & SNMP_CMD_SET) {
if (zend_parse_parameters(argc, "zzz", &oid, &type, &value) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else if (st & SNMP_CMD_WALK) {
if (zend_parse_parameters(argc, "z|bll", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query.non_repeaters)) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (suffix_keys) {
st |= SNMP_USE_SUFFIX_AS_KEYS;
}
} else if (st & SNMP_CMD_GET) {
if (zend_parse_parameters(argc, "z|b", &oid, &use_orignames) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (use_orignames) {
st |= SNMP_ORIGINAL_NAMES_AS_KEYS;
@@ -1208,7 +1208,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
/* SNMP_CMD_GETNEXT
*/
if (zend_parse_parameters(argc, "z", &oid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
}
@@ -1318,7 +1318,7 @@ PHP_FUNCTION(snmpset)
PHP_FUNCTION(snmp_get_quick_print)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT));
@@ -1332,7 +1332,7 @@ PHP_FUNCTION(snmp_set_quick_print)
zend_long a1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, (int)a1);
@@ -1347,7 +1347,7 @@ PHP_FUNCTION(snmp_set_enum_print)
zend_long a1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, (int) a1);
@@ -1362,7 +1362,7 @@ PHP_FUNCTION(snmp_set_oid_output_format)
zend_long a1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch((int) a1) {
@@ -1470,7 +1470,7 @@ PHP_FUNCTION(snmp_set_valueretrieval)
zend_long method;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &method) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (method >= 0 && method <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) {
@@ -1488,7 +1488,7 @@ PHP_FUNCTION(snmp_set_valueretrieval)
PHP_FUNCTION(snmp_get_valueretrieval)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(SNMP_G(valueretrieval));
@@ -1503,7 +1503,7 @@ PHP_FUNCTION(snmp_read_mib)
size_t filename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!read_mib(filename)) {
@@ -1531,7 +1531,7 @@ PHP_METHOD(snmp, __construct)
snmp_object = Z_SNMP_P(object);
if (zend_parse_parameters(argc, "lss|ll", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (version) {
@@ -1572,7 +1572,7 @@ PHP_METHOD(snmp, close)
snmp_object = Z_SNMP_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
netsnmp_session_free(&(snmp_object->session));
@@ -1627,7 +1627,7 @@ PHP_METHOD(snmp, setSecurity)
if (zend_parse_parameters(argc, "s|ssssss", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (netsnmp_session_set_security(snmp_object->session, a1, a2, a3, a4, a5, a6, a7)) {
@@ -1648,7 +1648,7 @@ PHP_METHOD(snmp, getErrno)
snmp_object = Z_SNMP_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_LONG(snmp_object->snmp_errno);
@@ -1666,7 +1666,7 @@ PHP_METHOD(snmp, getError)
snmp_object = Z_SNMP_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(snmp_object->snmp_errstr);
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index bcaad91d4f..0f421535b8 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -647,7 +647,7 @@ PHP_METHOD(SoapParam, __construct)
zval *this_ptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &data, &name, &name_length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_length == 0) {
php_error_docref(NULL, E_WARNING, "Invalid parameter name");
@@ -672,7 +672,7 @@ PHP_METHOD(SoapHeader, __construct)
zval *this_ptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|zbz", &ns, &ns_len, &name, &name_len, &data, &must_understand, &actor) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ns_len == 0) {
php_error_docref(NULL, E_WARNING, "Invalid namespace");
@@ -717,7 +717,7 @@ PHP_METHOD(SoapFault, __construct)
&fault_string, &fault_string_len,
&fault_actor, &fault_actor_len,
&details, &name, &name_len, &headerfault) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (Z_TYPE_P(code) == IS_NULL) {
@@ -767,7 +767,7 @@ PHP_METHOD(SoapFault, __toString)
zend_long line_val;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
this_ptr = ZEND_THIS;
@@ -816,7 +816,7 @@ PHP_METHOD(SoapVar, __construct)
size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z!z|ssss", &data, &type, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
this_ptr = ZEND_THIS;
@@ -966,7 +966,7 @@ PHP_METHOD(SoapServer, __construct)
HashTable *typemap_ht = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
SOAP_SERVER_BEGIN_CODE();
@@ -1128,7 +1128,7 @@ PHP_METHOD(SoapServer, setClass)
FETCH_THIS_SERVICE(service);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S*", &classname, &argv, &num_args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ce = zend_lookup_class(classname);
@@ -1168,7 +1168,7 @@ PHP_METHOD(SoapServer, setObject)
FETCH_THIS_SERVICE(service);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
- return;
+ RETURN_THROWS();
}
service->type = SOAP_OBJECT;
@@ -1191,7 +1191,7 @@ PHP_METHOD(SoapServer, getFunctions)
SOAP_SERVER_BEGIN_CODE();
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
FETCH_THIS_SERVICE(service);
@@ -1237,7 +1237,7 @@ PHP_METHOD(SoapServer, addFunction)
FETCH_THIS_SERVICE(service);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &function_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* TODO: could use zend_is_callable here */
@@ -1358,7 +1358,7 @@ PHP_METHOD(SoapServer, handle)
SOAP_GLOBAL(soap_version) = service->version;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &arg, &arg_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() > 0 && ZEND_SIZE_T_INT_OVFL(arg_len)) {
@@ -1847,7 +1847,7 @@ PHP_METHOD(SoapServer, fault)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|szs",
&code, &code_len, &string, &string_len, &actor, &actor_len, &details,
&name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
soap_server_fault(code, string, actor, details, name);
@@ -2433,7 +2433,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
ret = FALSE;
}
return ret;
-}
+}
/* }}} */
static void do_soap_call(zend_execute_data *execute_data,
@@ -3672,7 +3672,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
*node = method;
}
return use;
-}
+}
/* }}} */
static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name, char *uri, zval *ret, soapHeader* headers, int version) /* {{{ */
diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c
index 6ceb4035b8..847548a81c 100644
--- a/ext/sockets/sendrecvmsg.c
+++ b/ext/sockets/sendrecvmsg.c
@@ -174,7 +174,7 @@ PHP_FUNCTION(socket_sendmsg)
/* zmsg should be passed by ref */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra|l", &zsocket, &zmsg, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
LONG_CHECK_VALID_INT(flags);
@@ -219,7 +219,7 @@ PHP_FUNCTION(socket_recvmsg)
//ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra|l",
&zsocket, &zmsg, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
LONG_CHECK_VALID_INT(flags);
@@ -282,7 +282,7 @@ PHP_FUNCTION(socket_cmsg_space)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
&level, &type, &n) == FAILURE) {
- return;
+ RETURN_THROWS();
}
LONG_CHECK_VALID_INT(level);
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index e1b87502d6..ed414bfc5d 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -762,7 +762,7 @@ PHP_FUNCTION(socket_select)
zend_bool sec_is_null = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!a!l!|l", &r_array, &w_array, &e_array, &sec, &sec_is_null, &usec) == FAILURE) {
- return;
+ RETURN_THROWS();
}
FD_ZERO(&rfds);
@@ -833,7 +833,7 @@ PHP_FUNCTION(socket_create_listen)
zend_long port, backlog = 128;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &port, &backlog) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!php_open_listen_sock(&php_sock, port, backlog)) {
@@ -857,7 +857,7 @@ PHP_FUNCTION(socket_accept)
socklen_t php_sa_len = sizeof(sa);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -880,7 +880,7 @@ PHP_FUNCTION(socket_set_nonblock)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -918,7 +918,7 @@ PHP_FUNCTION(socket_set_block)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -959,7 +959,7 @@ PHP_FUNCTION(socket_listen)
zend_long backlog = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &arg1, &backlog) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -982,7 +982,7 @@ PHP_FUNCTION(socket_close)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1016,7 +1016,7 @@ PHP_FUNCTION(socket_write)
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &arg1, &str, &str_len, &length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (length < 0) {
@@ -1058,7 +1058,7 @@ PHP_FUNCTION(socket_read)
zend_long length, type = PHP_BINARY_READ;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &arg1, &length, &type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* overflow check */
@@ -1125,7 +1125,7 @@ PHP_FUNCTION(socket_getsockname)
socklen_t salen = sizeof(php_sockaddr_storage);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|z", &arg1, &addr, &port) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1199,7 +1199,7 @@ PHP_FUNCTION(socket_getpeername)
socklen_t salen = sizeof(php_sockaddr_storage);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|z", &arg1, &arg2, &arg3) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1267,7 +1267,7 @@ PHP_FUNCTION(socket_create)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &arg1, &arg2, &arg3) == FAILURE) {
efree(php_sock);
- return;
+ RETURN_THROWS();
}
if (arg1 != AF_UNIX
@@ -1314,7 +1314,7 @@ PHP_FUNCTION(socket_connect)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rs|l", &arg1, &addr, &addr_len, &port) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1399,7 +1399,7 @@ PHP_FUNCTION(socket_strerror)
zend_long arg1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(sockets_strerror(arg1));
@@ -1420,7 +1420,7 @@ PHP_FUNCTION(socket_bind)
zend_long retval = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &arg1, &addr, &addr_len, &port) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1502,7 +1502,7 @@ PHP_FUNCTION(socket_recv)
zend_long len, flags;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rzll", &php_sock_res, &buf, &len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(php_sock_res), le_socket_name, le_socket)) == NULL) {
@@ -1545,7 +1545,7 @@ PHP_FUNCTION(socket_send)
char *buf;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsll", &arg1, &buf, &buf_len, &len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (len < 0) {
@@ -1587,7 +1587,7 @@ PHP_FUNCTION(socket_recvfrom)
zend_string *recv_buf;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rzllz|z", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1703,7 +1703,7 @@ PHP_FUNCTION(socket_sendto)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rslls|l", &arg1, &buf, &buf_len, &len, &flags, &addr, &addr_len, &port) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (len < 0) {
@@ -1786,7 +1786,7 @@ PHP_FUNCTION(socket_get_option)
zend_long level, optname;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll", &arg1, &level, &optname) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -1901,7 +1901,7 @@ PHP_FUNCTION(socket_set_option)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllz", &arg1, &level, &optname, &arg4) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -2036,7 +2036,7 @@ PHP_FUNCTION(socket_create_pair)
zend_long domain, type, protocol;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lllz", &domain, &type, &protocol, &fds_array_zval) == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_sock[0] = php_create_socket();
@@ -2101,7 +2101,7 @@ PHP_FUNCTION(socket_shutdown)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &arg1, &how_shutdown) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) {
@@ -2126,7 +2126,7 @@ PHP_FUNCTION(socket_last_error)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (arg1) {
@@ -2148,7 +2148,7 @@ PHP_FUNCTION(socket_clear_error)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (arg1) {
@@ -2221,7 +2221,7 @@ PHP_FUNCTION(socket_import_stream)
PHP_SOCKET socket; /* fd */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_stream_from_zval(stream, zstream);
@@ -2269,7 +2269,7 @@ PHP_FUNCTION(socket_export_stream)
size_t protocollen = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zsocket) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((socket = (php_socket *) zend_fetch_resource(Z_RES_P(zsocket), le_socket_name, le_socket)) == NULL) {
return;
@@ -2368,7 +2368,7 @@ PHP_FUNCTION(socket_addrinfo_lookup)
memset(&hints, 0, sizeof(hints));
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|sa", &hostname, &service, &service_len, &zhints) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zhints) {
@@ -2425,7 +2425,7 @@ PHP_FUNCTION(socket_addrinfo_bind)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) == NULL) {
@@ -2491,7 +2491,7 @@ PHP_FUNCTION(socket_addrinfo_connect)
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) == NULL) {
@@ -2555,7 +2555,7 @@ PHP_FUNCTION(socket_addrinfo_explain)
struct addrinfo *ai;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) == NULL) {
@@ -2616,7 +2616,7 @@ PHP_FUNCTION(socket_wsaprotocol_info_export)
HANDLE map;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zsocket, &target_pid) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((socket = (php_socket *) zend_fetch_resource(Z_RES_P(zsocket), le_socket_name, le_socket)) == NULL) {
return;
@@ -2672,7 +2672,7 @@ PHP_FUNCTION(socket_wsaprotocol_info_import)
HANDLE map;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &id, &id_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
map = OpenFileMapping(FILE_MAP_READ, FALSE, id);
@@ -2727,7 +2727,7 @@ PHP_FUNCTION(socket_wsaprotocol_info_release)
size_t id_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &id, &id_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_BOOL(SUCCESS == zend_hash_str_del(&(SOCKETS_G(wsa_info)), id, id_len));
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 7583b2bee3..f35e11f01d 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -108,7 +108,7 @@ PHP_METHOD(sqlite3, open)
db_obj = Z_SQLITE3_DB_P(object);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -186,7 +186,7 @@ PHP_METHOD(sqlite3, close)
db_obj = Z_SQLITE3_DB_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -218,7 +218,7 @@ PHP_METHOD(sqlite3, exec)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) {
- return;
+ RETURN_THROWS();
}
if (sqlite3_exec(db_obj->db, ZSTR_VAL(sql), NULL, NULL, &errtext) != SQLITE_OK) {
@@ -236,7 +236,7 @@ PHP_METHOD(sqlite3, exec)
PHP_METHOD(sqlite3, version)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -259,7 +259,7 @@ PHP_METHOD(sqlite3, lastInsertRowID)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG((zend_long) sqlite3_last_insert_rowid(db_obj->db));
@@ -277,7 +277,7 @@ PHP_METHOD(sqlite3, lastErrorCode)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -299,7 +299,7 @@ PHP_METHOD(sqlite3, lastExtendedErrorCode)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -323,7 +323,7 @@ PHP_METHOD(sqlite3, enableExtendedResultCodes)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &enable) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -349,7 +349,7 @@ PHP_METHOD(sqlite3, lastErrorMsg)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (db_obj->initialised) {
@@ -375,7 +375,7 @@ PHP_METHOD(sqlite3, busyTimeout)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ms)) {
- return;
+ RETURN_THROWS();
}
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -408,7 +408,7 @@ PHP_METHOD(sqlite3, loadExtension)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s", &extension, &extension_len)) {
- return;
+ RETURN_THROWS();
}
#ifdef ZTS
@@ -478,7 +478,7 @@ PHP_METHOD(sqlite3, changes)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(sqlite3_changes(db_obj->db));
@@ -493,7 +493,7 @@ PHP_METHOD(sqlite3, escapeString)
char *ret;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(sql)) {
@@ -524,7 +524,7 @@ PHP_METHOD(sqlite3, prepare)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) {
- return;
+ RETURN_THROWS();
}
if (!ZSTR_LEN(sql)) {
@@ -571,7 +571,7 @@ PHP_METHOD(sqlite3, query)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) {
- return;
+ RETURN_THROWS();
}
if (!ZSTR_LEN(sql)) {
@@ -687,7 +687,7 @@ PHP_METHOD(sqlite3, querySingle)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &sql, &entire_row)) {
- return;
+ RETURN_THROWS();
}
if (!ZSTR_LEN(sql)) {
@@ -981,7 +981,7 @@ PHP_METHOD(sqlite3, createFunction)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|ll", &sql_func, &sql_func_len, &callback_func, &sql_func_num_args, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!sql_func_len) {
@@ -1030,7 +1030,7 @@ PHP_METHOD(sqlite3, createAggregate)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &sql_func, &sql_func_len, &step_callback, &fini_callback, &sql_func_num_args) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!sql_func_len) {
@@ -1086,7 +1086,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;
+ RETURN_THROWS();
}
if (!collation_name_len) {
@@ -1295,7 +1295,7 @@ PHP_METHOD(sqlite3, openBlob)
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl|sl", &table, &table_len, &column, &column_len, &rowid, &dbname, &dbname_len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_NUM_ARGS() >= 4 && CHECK_NULL_PATH(dbname, dbname_len)) {
@@ -1341,7 +1341,7 @@ PHP_METHOD(sqlite3, enableExceptions)
db_obj = Z_SQLITE3_DB_P(object);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &enableExceptions) == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETVAL_BOOL(db_obj->exception);
@@ -1402,7 +1402,7 @@ PHP_METHOD(sqlite3, backup)
SQLITE3_CHECK_INITIALIZED(source_obj, source_obj->initialised, SQLite3)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|ss", &destination_zval, php_sqlite3_sc_entry, &source_dbname, &source_dbname_length, &destination_dbname, &destination_dbname_length) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length))
@@ -1457,7 +1457,7 @@ PHP_METHOD(sqlite3stmt, paramCount)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1476,7 +1476,7 @@ PHP_METHOD(sqlite3stmt, close)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1498,7 +1498,7 @@ PHP_METHOD(sqlite3stmt, reset)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1521,7 +1521,7 @@ PHP_METHOD(sqlite3stmt, clear)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1551,7 +1551,7 @@ PHP_METHOD(sqlite3stmt, readOnly)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1683,7 +1683,7 @@ PHP_METHOD(sqlite3stmt, getSQL)
int bind_rc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &expanded) == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1793,7 +1793,7 @@ static void sqlite3stmt_bind(INTERNAL_FUNCTION_PARAMETERS)
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz|l", &param.param_number, &parameter, &param.type) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &param.name, &parameter, &param.type) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1848,7 +1848,7 @@ PHP_METHOD(sqlite3stmt, execute)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
@@ -1912,7 +1912,7 @@ PHP_METHOD(sqlite3stmt, __construct)
stmt_obj = Z_SQLITE3_STMT_P(object);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "OS", &db_zval, php_sqlite3_sc_entry, &sql) == FAILURE) {
- return;
+ RETURN_THROWS();
}
db_obj = Z_SQLITE3_DB_P(db_zval);
@@ -1957,7 +1957,7 @@ PHP_METHOD(sqlite3result, numColumns)
SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(sqlite3_column_count(result_obj->stmt_obj->stmt));
@@ -1977,7 +1977,7 @@ PHP_METHOD(sqlite3result, columnName)
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();
}
column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column);
@@ -2001,7 +2001,7 @@ 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) {
@@ -2025,7 +2025,7 @@ PHP_METHOD(sqlite3result, fetchArray)
SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &mode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ret = sqlite3_step(result_obj->stmt_obj->stmt);
@@ -2080,7 +2080,7 @@ PHP_METHOD(sqlite3result, reset)
SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sqlite3_reset(result_obj->stmt_obj->stmt) != SQLITE_OK) {
@@ -2104,7 +2104,7 @@ PHP_METHOD(sqlite3result, finalize)
SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* We need to finalize an internal statement */
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 94b0edd770..3caaca5910 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -138,7 +138,7 @@ PHP_FUNCTION(msg_set_queue)
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &queue, &data) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
@@ -179,7 +179,7 @@ PHP_FUNCTION(msg_stat_queue)
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &queue) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
@@ -210,7 +210,7 @@ PHP_FUNCTION(msg_queue_exists)
zend_long key;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &key) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (msgget(key, 0) < 0) {
@@ -230,7 +230,7 @@ PHP_FUNCTION(msg_get_queue)
sysvmsg_queue_t *mq;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &key, &perms) == FAILURE) {
- return;
+ RETURN_THROWS();
}
mq = (sysvmsg_queue_t *) emalloc(sizeof(sysvmsg_queue_t));
@@ -258,7 +258,7 @@ PHP_FUNCTION(msg_remove_queue)
sysvmsg_queue_t *mq = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &queue) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
@@ -290,7 +290,7 @@ PHP_FUNCTION(msg_receive)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlzlz|blz",
&queue, &desiredmsgtype, &out_msgtype, &maxsize,
&out_message, &do_unserialize, &flags, &zerrcode) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (maxsize <= 0) {
@@ -375,7 +375,7 @@ PHP_FUNCTION(msg_send)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz|bbz",
&queue, &msgtype, &message, &do_serialize, &blocking, &zerror) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index c817098b9c..60b9a9f3e3 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -181,7 +181,7 @@ PHP_FUNCTION(sem_get)
sysvsem_sem *sem_ptr;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "l|lll", &key, &max_acquire, &perm, &auto_release)) {
- return;
+ RETURN_THROWS();
}
/* Get/create the semaphore. Note that we rely on the semaphores
@@ -292,11 +292,11 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
if (acquire) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|b", &arg_id, &nowait) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg_id) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -361,7 +361,7 @@ PHP_FUNCTION(sem_remove)
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg_id) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((sem_ptr = (sysvsem_sem *)zend_fetch_resource(Z_RES_P(arg_id), "SysV semaphore", php_sysvsem_module.le_sem)) == NULL) {
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index dbf907e945..950466e223 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -128,7 +128,7 @@ PHP_FUNCTION(shm_attach)
zend_long shm_key, shm_id, shm_size = php_sysvshm.init_mem, shm_flag = 0666;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|ll", &shm_key, &shm_size, &shm_flag)) {
- return;
+ RETURN_THROWS();
}
if (shm_size < 1) {
@@ -184,7 +184,7 @@ PHP_FUNCTION(shm_detach)
sysvshm_shm *shm_list_ptr;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "r", &shm_id)) {
- return;
+ RETURN_THROWS();
}
SHM_FETCH_RESOURCE(shm_list_ptr, shm_id);
RETURN_BOOL(SUCCESS == zend_list_close(Z_RES_P(shm_id)));
@@ -199,7 +199,7 @@ PHP_FUNCTION(shm_remove)
sysvshm_shm *shm_list_ptr;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "r", &shm_id)) {
- return;
+ RETURN_THROWS();
}
SHM_FETCH_RESOURCE(shm_list_ptr, shm_id);
@@ -224,7 +224,7 @@ PHP_FUNCTION(shm_put_var)
php_serialize_data_t var_hash;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rlz", &shm_id, &shm_key, &arg_var)) {
- return;
+ RETURN_THROWS();
}
/* setup string-variable and serialize */
@@ -265,7 +265,7 @@ PHP_FUNCTION(shm_get_var)
php_unserialize_data_t var_hash;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &shm_id, &shm_key)) {
- return;
+ RETURN_THROWS();
}
SHM_FETCH_RESOURCE(shm_list_ptr, shm_id);
@@ -298,7 +298,7 @@ PHP_FUNCTION(shm_has_var)
sysvshm_shm *shm_list_ptr;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &shm_id, &shm_key)) {
- return;
+ RETURN_THROWS();
}
SHM_FETCH_RESOURCE(shm_list_ptr, shm_id);
RETURN_BOOL(php_check_shm_data(shm_list_ptr->ptr, shm_key) >= 0);
@@ -314,7 +314,7 @@ PHP_FUNCTION(shm_remove_var)
sysvshm_shm *shm_list_ptr;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &shm_id, &shm_key)) {
- return;
+ RETURN_THROWS();
}
SHM_FETCH_RESOURCE(shm_list_ptr, shm_id);
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index a519cd39cc..b045ffa29a 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -56,7 +56,7 @@
PHPTidyObj *obj; \
zval *object; \
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, tidy_ce_doc) == FAILURE) { \
- return; \
+ RETURN_THROWS(); \
} \
obj = Z_TIDY_P(object); \
@@ -64,7 +64,7 @@
PHPTidyObj *obj; \
TIDY_SET_CONTEXT; \
if (zend_parse_parameters_none() == FAILURE) { \
- return; \
+ RETURN_THROWS(); \
} \
obj = Z_TIDY_P(object); \
@@ -459,14 +459,14 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
zend_bool use_include_path = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|zsb", &arg1, &config, &enc, &enc_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(data = php_tidy_file_to_mem(ZSTR_VAL(arg1), use_include_path))) {
RETURN_FALSE;
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|zs", &arg1, &config, &enc, &enc_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
data = arg1;
}
@@ -1108,7 +1108,7 @@ static PHP_FUNCTION(tidy_parse_string)
PHPTidyObj *obj;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|zs", &input, &options, &enc, &enc_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(input))) {
@@ -1171,7 +1171,7 @@ static PHP_FUNCTION(tidy_parse_file)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|zsb", &inputfile,
&options, &enc, &enc_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
tidy_instanciate(tidy_ce_doc, return_value);
@@ -1249,7 +1249,7 @@ static PHP_FUNCTION(tidy_diagnose)
static PHP_FUNCTION(tidy_get_release)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
#if HAVE_TIDYRELEASEDATE
@@ -1479,7 +1479,7 @@ static TIDY_DOC_METHOD(__construct)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|Pzsb", &inputfile,
&options, &enc, &enc_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
obj = Z_TIDY_P(object);
@@ -1518,7 +1518,7 @@ static TIDY_DOC_METHOD(parseFile)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|zsb", &inputfile,
&options, &enc, &enc_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(contents = php_tidy_file_to_mem(ZSTR_VAL(inputfile), use_include_path))) {
@@ -1553,7 +1553,7 @@ static TIDY_DOC_METHOD(parseString)
TIDY_SET_CONTEXT;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|zs", &input, &options, &enc, &enc_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(input))) {
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index a033accfdb..e0b3f73f45 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -1067,7 +1067,7 @@ static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int ns_supp
XML_Char *encoding;
if (zend_parse_parameters(ZEND_NUM_ARGS(), (ns_support ? "|ss": "|s"), &encoding_param, &encoding_param_len, &ns_param, &ns_param_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (encoding_param != NULL) {
@@ -1133,7 +1133,7 @@ PHP_FUNCTION(xml_set_object)
zval *pind, *mythis;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oo", &pind, xml_parser_ce, &mythis) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1154,7 +1154,7 @@ PHP_FUNCTION(xml_set_element_handler)
zval *pind, *shdl, *ehdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ozz", &pind, xml_parser_ce, &shdl, &ehdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1173,7 +1173,7 @@ PHP_FUNCTION(xml_set_character_data_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1191,7 +1191,7 @@ PHP_FUNCTION(xml_set_processing_instruction_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1209,7 +1209,7 @@ PHP_FUNCTION(xml_set_default_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1227,7 +1227,7 @@ PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1245,7 +1245,7 @@ PHP_FUNCTION(xml_set_notation_decl_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1263,7 +1263,7 @@ PHP_FUNCTION(xml_set_external_entity_ref_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1281,7 +1281,7 @@ PHP_FUNCTION(xml_set_start_namespace_decl_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1299,7 +1299,7 @@ PHP_FUNCTION(xml_set_end_namespace_decl_handler)
zval *pind, *hdl;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz", &pind, xml_parser_ce, &hdl) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1321,7 +1321,7 @@ PHP_FUNCTION(xml_parse)
zend_bool isFinal = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|b", &pind, xml_parser_ce, &data, &data_len, &isFinal) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1344,7 +1344,7 @@ PHP_FUNCTION(xml_parse_into_struct)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Osz|z", &pind, xml_parser_ce, &data, &data_len, &xdata, &info) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1389,7 +1389,7 @@ PHP_FUNCTION(xml_get_error_code)
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pind, xml_parser_ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1405,7 +1405,7 @@ PHP_FUNCTION(xml_error_string)
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &code) == FAILURE) {
- return;
+ RETURN_THROWS();
}
str = (char *)XML_ErrorString((int)code);
@@ -1423,7 +1423,7 @@ PHP_FUNCTION(xml_get_current_line_number)
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pind, xml_parser_ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1439,7 +1439,7 @@ PHP_FUNCTION(xml_get_current_column_number)
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pind, xml_parser_ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1455,7 +1455,7 @@ PHP_FUNCTION(xml_get_current_byte_index)
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pind, xml_parser_ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1471,7 +1471,7 @@ PHP_FUNCTION(xml_parser_free)
xml_parser *parser;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pind, xml_parser_ce) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1493,7 +1493,7 @@ PHP_FUNCTION(xml_parser_set_option)
zend_long opt;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Olz", &pind, xml_parser_ce, &opt, &val) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
@@ -1543,7 +1543,7 @@ PHP_FUNCTION(xml_parser_get_option)
zend_long opt;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &pind, xml_parser_ce, &opt) == FAILURE) {
- return;
+ RETURN_THROWS();
}
parser = Z_XMLPARSER_P(pind);
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index 90f5bfc14f..8ba87763c1 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -388,7 +388,7 @@ static void php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_rea
char *name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!name_len) {
@@ -419,7 +419,7 @@ static void php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_in
xmlreader_object *intern;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -447,7 +447,7 @@ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_
xmlreader_object *intern;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -477,7 +477,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t
char *source;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p!", &source, &source_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (source != NULL && !source_len) {
@@ -529,7 +529,7 @@ PHP_METHOD(xmlreader, close)
xmlreader_object *intern;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -561,7 +561,7 @@ PHP_METHOD(xmlreader, getAttributeNo)
xmlreader_object *intern;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &attr_pos) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -587,7 +587,7 @@ PHP_METHOD(xmlreader, getAttributeNs)
char *name, *ns_uri, *retchar = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &ns_uri, &ns_uri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len == 0 || ns_uri_len == 0) {
@@ -618,7 +618,7 @@ PHP_METHOD(xmlreader, getParserProperty)
xmlreader_object *intern;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &property) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -665,7 +665,7 @@ PHP_METHOD(xmlreader, moveToAttribute)
char *name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len == 0) {
@@ -698,7 +698,7 @@ PHP_METHOD(xmlreader, moveToAttributeNo)
xmlreader_object *intern;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &attr_pos) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -727,7 +727,7 @@ PHP_METHOD(xmlreader, moveToAttributeNs)
char *name, *ns_uri;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &ns_uri, &ns_uri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len == 0 || ns_uri_len == 0) {
@@ -782,7 +782,7 @@ PHP_METHOD(xmlreader, read)
xmlreader_object *intern;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -812,7 +812,7 @@ PHP_METHOD(xmlreader, next)
char *name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -851,7 +851,7 @@ PHP_METHOD(xmlreader, open)
xmlTextReaderPtr reader = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!l", &source, &source_len, &encoding, &encoding_len, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = getThis();
@@ -937,7 +937,7 @@ PHP_METHOD(xmlreader, setSchema)
char *source;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p!", &source, &source_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (source != NULL && !source_len) {
@@ -979,7 +979,7 @@ PHP_METHOD(xmlreader, setParserProperty)
xmlreader_object *intern;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &property, &value) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = ZEND_THIS;
@@ -1034,7 +1034,7 @@ PHP_METHOD(xmlreader, XML)
xmlTextReaderPtr reader;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s!l", &source, &source_len, &encoding, &encoding_len, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
id = getThis();
@@ -1117,7 +1117,7 @@ PHP_METHOD(xmlreader, expand)
id = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O!", &basenode, dom_node_class_entry) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (basenode != NULL) {
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index a3f54b8bcb..f8ce476a93 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -609,7 +609,7 @@ PHP_FUNCTION(xmlrpc_encode_request)
php_output_options out;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!z|a", &method, &method_len, &vals, &out_opts) == FAILURE) {
- return;
+ RETURN_THROWS();
}
set_output_options(&out, out_opts ? out_opts : 0);
@@ -657,7 +657,7 @@ PHP_FUNCTION(xmlrpc_encode)
char *outBuf;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (USED_RET()) {
@@ -723,7 +723,7 @@ PHP_FUNCTION(xmlrpc_decode_request)
size_t xml_len, encoding_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|s", &xml, &xml_len, &method, &encoding, &encoding_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (USED_RET()) {
@@ -740,7 +740,7 @@ PHP_FUNCTION(xmlrpc_decode)
size_t arg1_len, arg2_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &arg1, &arg1_len, &arg2, &arg2_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (USED_RET()) {
@@ -758,7 +758,7 @@ PHP_FUNCTION(xmlrpc_decode)
PHP_FUNCTION(xmlrpc_server_create)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (USED_RET()) {
@@ -786,7 +786,7 @@ PHP_FUNCTION(xmlrpc_server_destroy)
xmlrpc_server_data *server;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(arg1), "xmlrpc server", le_xmlrpc_server)) == NULL) {
@@ -909,7 +909,7 @@ PHP_FUNCTION(xmlrpc_server_register_method)
xmlrpc_server_data* server;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz", &handle, &method_key, &method_key_len, &method_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(handle), "xmlrpc server", le_xmlrpc_server)) == NULL) {
@@ -939,7 +939,7 @@ PHP_FUNCTION(xmlrpc_server_register_introspection_callback)
xmlrpc_server_data* server;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &handle, &method_name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(handle), "xmlrpc server", le_xmlrpc_server)) == NULL) {
@@ -971,7 +971,7 @@ PHP_FUNCTION(xmlrpc_server_call_method)
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rsz|a", &handle, &rawxml, &rawxml_len, &caller_params, &output_opts) != SUCCESS) {
- return;
+ RETURN_THROWS();
}
/* user output options */
if (argc == 3) {
@@ -1073,7 +1073,7 @@ PHP_FUNCTION(xmlrpc_server_add_introspection_data)
XMLRPC_VALUE xDesc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &handle, &desc) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(handle), "xmlrpc server", le_xmlrpc_server)) == NULL) {
@@ -1098,7 +1098,7 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
size_t arg1_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &arg1, &arg1_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (USED_RET()) {
@@ -1328,7 +1328,7 @@ PHP_FUNCTION(xmlrpc_set_type)
XMLRPC_VALUE_TYPE vtype;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &arg, &type, &type_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
vtype = xmlrpc_str_as_type(type);
@@ -1356,7 +1356,7 @@ PHP_FUNCTION(xmlrpc_get_type)
XMLRPC_VECTOR_TYPE vtype = xmlrpc_vector_none;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
type = get_zval_xmlrpc_type(arg, 0);
@@ -1375,7 +1375,7 @@ PHP_FUNCTION(xmlrpc_is_fault)
zval *arg;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &arg) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* The "correct" way to do this would be to call the xmlrpc
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index 81fe003ace..5a629135bd 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -1058,7 +1058,7 @@ static PHP_FUNCTION(xmlwriter_open_uri)
ze_xmlwriter_object *ze_obj = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &source, &source_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (self) {
@@ -1112,7 +1112,7 @@ static PHP_FUNCTION(xmlwriter_open_memory)
ze_xmlwriter_object *ze_obj = NULL;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (self) {
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index 7c023f0fc7..a5d2765606 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -403,7 +403,7 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
id = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &docp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
nodep = php_libxml_import_node(docp);
@@ -630,7 +630,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
sheetp = (xsltStylesheetPtr) intern->ptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|S!", &docp, &ret_class) == FAILURE) {
- return;
+ RETURN_THROWS();
}
newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
@@ -687,7 +687,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri)
sheetp = (xsltStylesheetPtr) intern->ptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "op", &docp, &uri, &uri_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
@@ -719,7 +719,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml)
sheetp = (xsltStylesheetPtr) intern->ptr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &docp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
@@ -800,7 +800,7 @@ PHP_FUNCTION(xsl_xsltprocessor_get_parameter)
DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
intern = Z_XSL_P(id);
if ((value = zend_hash_find(intern->parameter, name)) != NULL) {
@@ -824,7 +824,7 @@ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter)
DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
- return;
+ RETURN_THROWS();
}
intern = Z_XSL_P(id);
if (zend_hash_del(intern->parameter, name) == SUCCESS) {
@@ -910,7 +910,7 @@ PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs)
DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) {
- return;
+ RETURN_THROWS();
}
intern = Z_XSL_P(id);
oldSecurityPrefs = intern->securityPrefs;
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
index b4a5ad927a..2f21bd8158 100644
--- a/ext/zend_test/test.c
+++ b/ext/zend_test/test.c
@@ -95,7 +95,7 @@ ZEND_FUNCTION(zend_create_unterminated_string)
zend_string *str, *res;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
res = zend_string_alloc(ZSTR_LEN(str), 0);
@@ -111,7 +111,7 @@ ZEND_FUNCTION(zend_terminate_string)
zend_string *str;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZSTR_VAL(str)[ZSTR_LEN(str)] = '\0';
@@ -124,7 +124,7 @@ ZEND_FUNCTION(zend_leak_bytes)
zend_long leakbytes = 3;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &leakbytes) == FAILURE) {
- return;
+ RETURN_THROWS();
}
emalloc(leakbytes);
@@ -138,7 +138,7 @@ ZEND_FUNCTION(zend_leak_variable)
zval *zv;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zv) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!Z_REFCOUNTED_P(zv)) {
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index e4fcc362ec..776b433850 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -1062,7 +1062,7 @@ static PHP_NAMED_FUNCTION(zif_zip_open)
zend_string *filename;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filename) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(filename) == 0) {
@@ -1101,7 +1101,7 @@ static PHP_NAMED_FUNCTION(zif_zip_close)
zip_rsrc *z_rsrc = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((z_rsrc = (zip_rsrc *)zend_fetch_resource(Z_RES_P(zip), le_zip_dir_name, le_zip_dir)) == NULL) {
@@ -1123,7 +1123,7 @@ static PHP_NAMED_FUNCTION(zif_zip_read)
zip_rsrc *rsrc_int;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_dp) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((rsrc_int = (zip_rsrc *)zend_fetch_resource(Z_RES_P(zip_dp), le_zip_dir_name, le_zip_dir)) == NULL) {
@@ -1172,7 +1172,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_open)
zip_rsrc *z_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|s", &zip, &zip_entry, &mode, &mode_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
@@ -1199,7 +1199,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_close)
zip_read_rsrc * zr_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
@@ -1221,7 +1221,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_read)
int n = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &zip_entry, &len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
@@ -1255,7 +1255,7 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{
zip_read_rsrc * zr_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
@@ -1349,7 +1349,7 @@ static ZIPARCHIVE_METHOD(open)
ze_zip_object *ze_obj;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &filename, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
/* We do not use ZIP_FROM_OBJECT, zip init function here */
@@ -1406,7 +1406,7 @@ static ZIPARCHIVE_METHOD(setPassword)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &password, &password_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (password_len < 1) {
@@ -1432,7 +1432,7 @@ static ZIPARCHIVE_METHOD(close)
int err;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZIP_FROM_OBJECT(intern, self);
@@ -1470,7 +1470,7 @@ static ZIPARCHIVE_METHOD(count)
zip_int64_t num;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZIP_FROM_OBJECT(intern, self);
@@ -1494,7 +1494,7 @@ static ZIPARCHIVE_METHOD(getStatusString)
#endif
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZIP_FROM_OBJECT(intern, self);
@@ -1528,7 +1528,7 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&dirname, &dirname_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (dirname_len<1) {
@@ -1580,12 +1580,12 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
if (type == 1) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|la",
&pattern, &flags, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sa",
&pattern, &path, &path_len, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
@@ -1700,7 +1700,7 @@ static ZIPARCHIVE_METHOD(addFile)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sll",
&filename, &entry_name, &entry_name_len, &offset_start, &offset_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(filename) == 0) {
@@ -1739,7 +1739,7 @@ static ZIPARCHIVE_METHOD(addFromString)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS",
&name, &name_len, &buffer) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ze_obj = Z_ZIP_P(self);
@@ -1792,7 +1792,7 @@ static ZIPARCHIVE_METHOD(statName)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
@@ -1815,7 +1815,7 @@ static ZIPARCHIVE_METHOD(statIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l",
&index, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zip_stat_index(intern, index, flags, &sb) != 0) {
@@ -1838,7 +1838,7 @@ static ZIPARCHIVE_METHOD(locateName)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (ZSTR_LEN(name) < 1) {
@@ -1868,7 +1868,7 @@ static ZIPARCHIVE_METHOD(getNameIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l",
&index, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
name = zip_get_name(intern, (int) index, flags);
@@ -1893,7 +1893,7 @@ static ZIPARCHIVE_METHOD(setArchiveComment)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &comment, &comment_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (comment_len > 0xffff) {
@@ -1922,7 +1922,7 @@ static ZIPARCHIVE_METHOD(getArchiveComment)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
@@ -1947,7 +1947,7 @@ static ZIPARCHIVE_METHOD(setCommentName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss",
&name, &name_len, &comment, &comment_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -1982,7 +1982,7 @@ static ZIPARCHIVE_METHOD(setCommentIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls",
&index, &comment, &comment_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (comment_len > 0xffff) {
@@ -2013,7 +2013,7 @@ static ZIPARCHIVE_METHOD(setExternalAttributesName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll|l",
&name, &name_len, &opsys, &attr, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -2045,7 +2045,7 @@ static ZIPARCHIVE_METHOD(setExternalAttributesIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll|l",
&index, &opsys, &attr, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
@@ -2074,7 +2074,7 @@ static ZIPARCHIVE_METHOD(getExternalAttributesName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l",
&name, &name_len, &z_opsys, &z_attr, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -2110,7 +2110,7 @@ static ZIPARCHIVE_METHOD(getExternalAttributesIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lzz|l",
&index, &z_opsys, &z_attr, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
@@ -2141,7 +2141,7 @@ static ZIPARCHIVE_METHOD(setEncryptionName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|s",
&name, &name_len, &method, &password, &password_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -2174,7 +2174,7 @@ static ZIPARCHIVE_METHOD(setEncryptionIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|s",
&index, &method, &password, &password_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
@@ -2202,7 +2202,7 @@ static ZIPARCHIVE_METHOD(getCommentName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l",
&name, &name_len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
php_error_docref(NULL, E_NOTICE, "Empty string as entry name");
@@ -2234,7 +2234,7 @@ static ZIPARCHIVE_METHOD(getCommentIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l",
&index, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
@@ -2258,7 +2258,7 @@ static ZIPARCHIVE_METHOD(setCompressionName)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l",
&name, &name_len, &comp_method, &comp_flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -2291,7 +2291,7 @@ static ZIPARCHIVE_METHOD(setCompressionIndex)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
&index, &comp_method, &comp_flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zip_set_file_compression(intern, (zip_uint64_t)index,
@@ -2313,7 +2313,7 @@ static ZIPARCHIVE_METHOD(deleteIndex)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (index < 0) {
@@ -2341,7 +2341,7 @@ static ZIPARCHIVE_METHOD(deleteName)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
RETURN_FALSE;
@@ -2369,7 +2369,7 @@ static ZIPARCHIVE_METHOD(renameIndex)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &index, &new_name, &new_name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (index < 0) {
@@ -2400,7 +2400,7 @@ static ZIPARCHIVE_METHOD(renameName)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &new_name, &new_name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (new_name_len < 1) {
@@ -2428,7 +2428,7 @@ static ZIPARCHIVE_METHOD(unchangeIndex)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (index < 0) {
@@ -2456,7 +2456,7 @@ static ZIPARCHIVE_METHOD(unchangeName)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (name_len < 1) {
@@ -2481,7 +2481,7 @@ static ZIPARCHIVE_METHOD(unchangeAll)
zval *self = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZIP_FROM_OBJECT(intern, self);
@@ -2502,7 +2502,7 @@ static ZIPARCHIVE_METHOD(unchangeArchive)
zval *self = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
ZIP_FROM_OBJECT(intern, self);
@@ -2535,7 +2535,7 @@ static ZIPARCHIVE_METHOD(extractTo)
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|z", &pathto, &pathto_len, &zval_files) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (pathto_len < 1) {
@@ -2624,12 +2624,12 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
if (type == 1) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|ll", &filename, &len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|ll", &index, &len, &flags) == FAILURE) {
- return;
+ RETURN_THROWS();
}
PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
}
@@ -2696,7 +2696,7 @@ static ZIPARCHIVE_METHOD(getStream)
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filename) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (zip_stat(intern, ZSTR_VAL(filename), 0, &sb) != 0) {
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 0db20c9010..60824a052c 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -489,7 +489,7 @@ static PHP_FUNCTION(ob_gzhandler)
* - we have to mess around with php_output_context */
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &in_str, &in_len, &flags)) {
- return;
+ RETURN_THROWS();
}
if (!(encoding = php_zlib_output_encoding())) {
@@ -542,7 +542,7 @@ static PHP_FUNCTION(ob_gzhandler)
static PHP_FUNCTION(zlib_get_coding_type)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
switch (ZLIBG(compression_coding)) {
case PHP_ZLIB_ENCODING_GZIP:
@@ -568,7 +568,7 @@ static PHP_FUNCTION(gzfile)
php_stream *stream;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", &filename, &filename_len, &use_include_path)) {
- return;
+ RETURN_THROWS();
}
if (use_include_path) {
@@ -608,7 +608,7 @@ static PHP_FUNCTION(gzopen)
zend_long use_include_path = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (use_include_path) {
@@ -636,7 +636,7 @@ static PHP_FUNCTION(readgzfile)
zend_long use_include_path = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", &filename, &filename_len, &use_include_path) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (use_include_path) {
@@ -662,11 +662,11 @@ static PHP_FUNCTION(name) \
zend_long encoding = default_encoding; \
if (default_encoding) { \
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "S|ll", &in, &level, &encoding)) { \
- return; \
+ RETURN_THROWS(); \
} \
} else { \
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "Sl|l", &in, &encoding, &level)) { \
- return; \
+ RETURN_THROWS(); \
} \
} \
if (level < -1 || level > 9) { \
@@ -696,7 +696,7 @@ static PHP_FUNCTION(name) \
size_t out_len; \
zend_long max_len = 0; \
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &in_buf, &in_len, &max_len)) { \
- return; \
+ RETURN_THROWS(); \
} \
if (max_len < 0) { \
php_error_docref(NULL, E_WARNING, "length (" ZEND_LONG_FMT ") must be greater or equal zero", max_len); \
@@ -837,7 +837,7 @@ PHP_FUNCTION(inflate_init)
zval *option_buffer;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|H", &encoding, &options)) {
- return;
+ RETURN_THROWS();
}
if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("window"))) != NULL) {
@@ -913,7 +913,7 @@ PHP_FUNCTION(inflate_add)
int status;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &res, &in_buf, &in_len, &flush_type)) {
- return;
+ RETURN_THROWS();
}
if (!(ctx = zend_fetch_resource_ex(res, NULL, le_inflate))) {
@@ -1028,7 +1028,7 @@ PHP_FUNCTION(inflate_get_status)
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res))
{
- return;
+ RETURN_THROWS();
}
if (!(ctx = zend_fetch_resource_ex(res, NULL, le_inflate))) {
@@ -1049,7 +1049,7 @@ PHP_FUNCTION(inflate_get_read_len)
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res))
{
- return;
+ RETURN_THROWS();
}
if (!(ctx = zend_fetch_resource_ex(res, NULL, le_inflate))) {
@@ -1073,7 +1073,7 @@ PHP_FUNCTION(deflate_init)
zval *option_buffer;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|H", &encoding, &options)) {
- return;
+ RETURN_THROWS();
}
if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("level"))) != NULL) {
@@ -1169,7 +1169,7 @@ PHP_FUNCTION(deflate_add)
int status;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &res, &in_buf, &in_len, &flush_type)) {
- return;
+ RETURN_THROWS();
}
if (!(ctx = zend_fetch_resource_ex(res, NULL, le_deflate))) {