ZEND_NUM_ARGS(), "sa|ls",
&module_name, &module_name_len, &server_params, &cp,
&typelib_name, &typelib_name_len)) {
- return;
+ RETURN_THROWS();
}
cp_it = php_win32_cp_get_by_id((DWORD)cp);
if (!cp_it) {
php_com_throw_exception(E_INVALIDARG, "Could not create COM object - invalid codepage!");
- return;
+ RETURN_THROWS();
}
obj->code_page = (int)cp;
if (server_name && !COMG(allow_dcom)) {
php_com_throw_exception(E_ERROR, "DCOM has been disabled by your administrator [com.allow_dcom=0]");
- return;
+ RETURN_THROWS();
}
moniker = php_com_string_to_olestring(module_name, module_name_len, obj->code_page);
php_com_throw_exception(res, msg);
efree(msg);
- return;
+ RETURN_THROWS();
}
/* we got the object and it lives ! */
snprintf(buf, sizeof(buf), "Failed to init .Net runtime [%s] %s", where, err);
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
- return;
+ RETURN_THROWS();
}
stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff);
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
ZVAL_NULL(object);
- return;
+ RETURN_THROWS();
}
where = "QI: System._AppDomain";
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
ZVAL_NULL(object);
- return;
+ RETURN_THROWS();
}
}
cp_it = php_win32_cp_get_by_id((DWORD)cp);
if (!cp_it) {
php_com_throw_exception(E_INVALIDARG, "Could not create .Net object - invalid codepage!");
- return;
+ RETURN_THROWS();
}
obj->code_page = (int)cp_it->id;
snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] [0x%08x] %s", where, hr, err);
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
- return;
+ RETURN_THROWS();
}
}
/* }}} */
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
-#define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM object is associated with this helper instance"); return; }
+#define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM object is associated with this helper instance"); RETURN_THROWS(); }
typedef struct {
zend_object std;
res = IPersistStream_GetSizeMax(helper->ips, &size);
} else {
php_com_throw_exception(res, NULL);
- return;
+ RETURN_THROWS();
}
}
if (stream == NULL) {
php_com_throw_exception(E_INVALIDARG, "expected a stream");
- return;
+ RETURN_THROWS();
}
stm = php_com_wrapper_export_stream(stream);
if (stm == NULL) {
php_com_throw_exception(E_UNEXPECTED, "failed to wrap stream");
- return;
+ RETURN_THROWS();
}
res = S_OK;
if (FAILED(res)) {
php_com_throw_exception(res, NULL);
- RETURN_NULL();
+ RETURN_THROWS();
}
}
/* }}} */
if (stream == NULL) {
php_com_throw_exception(E_INVALIDARG, "expected a stream");
- return;
+ RETURN_THROWS();
}
stm = php_com_wrapper_export_stream(stream);
if (stm == NULL) {
php_com_throw_exception(E_UNEXPECTED, "failed to wrap stream");
- return;
+ RETURN_THROWS();
}
res = get_persist_stream_init(helper);
if (FAILED(res)) {
php_com_throw_exception(res, NULL);
- return;
+ RETURN_THROWS();
}
RETURN_TRUE;
if (V_VT(&obj->v) != VT_DISPATCH || V_DISPATCH(&obj->v) == NULL) {
php_com_throw_exception(E_INVALIDARG, "parameter must represent an IDispatch COM object");
- return;
+ RETURN_THROWS();
}
/* it is always safe to cast an interface to IUnknown */
php_com_variant_from_zval(vright, zright, codepage);
} else {
- return;
+ RETURN_THROWS();
}
switch (op) {
vleft = &left_val;
php_com_variant_from_zval(vleft, zleft, codepage);
} else {
- return;
+ RETURN_THROWS();
}
switch (op) {
vleft = &left_val;
php_com_variant_from_zval(vleft, zleft, codepage);
} else {
- return;
+ RETURN_THROWS();
}
if (SUCCEEDED(VarRound(vleft, (int)decimals, &vres))) {
php_com_variant_from_zval(vright, zright, codepage);
} else {
- return;
+ RETURN_THROWS();
}
ZVAL_LONG(return_value, VarCmp(vleft, vright, (LCID)lcid, (ULONG)flags));
/* Exception during string conversion */
if (EG(exception)) {
FREENOW;
- return;
+ RETURN_THROWS();
}
if (persistent) {
if (sugg) {
sugg = zend_try_array_init(sugg);
if (!sugg) {
- return;
+ RETURN_THROWS();
}
}
#define ZEND_FFI_VALIDATE_API_RESTRICTION() do { \
if (UNEXPECTED(!zend_ffi_validate_api_restriction(execute_data))) { \
- return; \
+ RETURN_THROWS(); \
} \
} while (0)
zval *SIM; \
gdImagePtr im_src; \
if (zend_parse_parameters(1, "O", &SIM, gd_image_ce) == FAILURE) { \
- return; \
+ RETURN_THROWS(); \
} \
im_src = php_gd_libgdimageptr_from_zval_p(SIM);
size_t type_len, retval;
zend_string *name;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &type, &type_len, &charset) == FAILURE)
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &type, &type_len, &charset) == FAILURE) {
+ RETURN_THROWS();
+ }
if (ZSTR_LEN(charset) >= ICONV_CSNMAXLEN) {
php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
if (idna_info != NULL) {
idna_info = zend_try_array_init(idna_info);
if (!idna_info) {
- return;
+ RETURN_THROWS();
}
}
array = zend_try_array_init(array);
if (!array) {
- return;
+ RETURN_THROWS();
}
if (ctrls == NULL) {
zend_string *val;
val = zval_get_string(newval);
if (EG(exception)) {
- return;
+ RETURN_THROWS();
}
if (ldap_set_option(ldap, option, ZSTR_VAL(val))) {
zend_string_release(val);
case 6:
referrals = zend_try_array_init(referrals);
if (!referrals) {
- return;
+ RETURN_THROWS();
}
if (lreferrals != NULL) {
refp = lreferrals;
referrals = zend_try_array_init(referrals);
if (!referrals) {
- return;
+ RETURN_THROWS();
}
if (lreferrals != NULL) {
track_vars_array = zend_try_array_init(track_vars_array);
if (!track_vars_array) {
- return;
+ RETURN_THROWS();
}
encstr = estrndup(encstr, encstr_len);
if (array != NULL) {
array = zend_try_array_init(array);
if (!array) {
- return;
+ RETURN_THROWS();
}
}
/* Fetch by Row: array will contain one sub-array per query row */
array = zend_try_array_init(array);
if (!array) {
- return;
+ RETURN_THROWS();
}
columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0);
/* Fetch by columns: array will contain one sub-array per query column */
array = zend_try_array_init_size(array, statement->ncolumns);
if (!array) {
- return;
+ RETURN_THROWS();
}
columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0);
pv_res_arr = zend_try_array_init(pv_res_arr);
if (!pv_res_arr) {
- return;
+ RETURN_THROWS();
}
#ifdef HAVE_SQL_EXTENDED_FETCH
if (z_rusage) {
z_rusage = zend_try_array_init(z_rusage);
if (!z_rusage) {
- return;
+ RETURN_THROWS();
}
memset(&rusage, 0, sizeof(struct rusage));
if (z_rusage) {
z_rusage = zend_try_array_init(z_rusage);
if (!z_rusage) {
- return;
+ RETURN_THROWS();
}
memset(&rusage, 0, sizeof(struct rusage));
if (user_oldset != NULL) {
user_oldset = zend_try_array_init(user_oldset);
if (!user_oldset) {
- return;
+ RETURN_THROWS();
}
for (signo = 1; signo < NSIG; ++signo) {
zval_ptr_dtor(&arg);
if (EG(exception)) {
zval_ptr_dtor(&iter);
- RETURN_FALSE;
+ RETURN_THROWS();
}
if (SUCCESS != object_init_ex(&iteriter, spl_ce_RecursiveIteratorIterator)) {
if (EG(exception)) {
zval_ptr_dtor(&iter);
zval_ptr_dtor(&iteriter);
- RETURN_FALSE;
+ RETURN_THROWS();
}
zval_ptr_dtor(&iter);
if (EG(exception)) {
zval_ptr_dtor(&reflector);
- return;
+ RETURN_THROWS();
}
if (result == FAILURE) {
zval_ptr_dtor(&reflector);
zend_class_entry *ce;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
GET_REFLECTION_OBJECT_PTR(ce);
if (!REFLECTION_G(key_initialized)) {
if (php_random_bytes_throw(&REFLECTION_G(key_initialized), 16) == FAILURE) {
- return;
+ RETURN_THROWS();
}
REFLECTION_G(key_initialized) = 1;
SOAP_SERVER_BEGIN_CODE();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) {
- return;
+ RETURN_THROWS();
}
FETCH_THIS_SERVICE(service);
zval *this_ptr = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
SOAP_CLIENT_BEGIN_CODE();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sa|a!zz",
&function, &function_len, &args, &options, &headers, &output_headers) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (options) {
FETCH_THIS_SDL(sdl);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sdl) {
FETCH_THIS_SDL(sdl);
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (sdl) {
zval *tmp;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(ZEND_THIS), "__last_request", sizeof("__last_request")-1)) != NULL &&
zval *tmp;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(ZEND_THIS), "__last_response", sizeof("__last_response")-1)) != NULL &&
zval *tmp;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(ZEND_THIS), "__last_request_headers", sizeof("__last_request_headers")-1)) != NULL &&
zval *tmp;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(ZEND_THIS), "__last_response_headers", sizeof("__last_response_headers")-1)) != NULL &&
&location, &location_size,
&action, &action_size,
&version, &one_way) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (SOAP_GLOBAL(features) & SOAP_WAIT_ONE_WAY_CALLS) {
one_way = 0;
zval *this_ptr = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s!", &name, &name_len, &val, &val_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (val == NULL) {
zval *cookies;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
zval *this_ptr = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &headers) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) {
zval *this_ptr = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &location, &location_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location")-1)) != NULL && Z_TYPE_P(tmp) == IS_STRING) {
if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(zsocket),
php_sockets_le_socket_name, php_sockets_le_socket())) == NULL) {
- return;
+ RETURN_THROWS();
}
msghdr = from_zval_run_conversions(zmsg, php_sock, from_zval_write_msghdr_send,
if (!fds_array_zval) {
efree(php_sock[0]);
efree(php_sock[1]);
- return;
+ RETURN_THROWS();
}
php_sock[0]->bsd_socket = fds_array[0];
}
if (EG(exception)) {
- RETURN_NULL();
+ RETURN_THROWS();
}
/* zend_call_function may change args to IS_REF */
/* Exception during string conversion. */
if (EG(exception)) {
- return;
+ RETURN_THROWS();
}
switch (intern->u.regex.mode)
return;
}
if (EG(exception)) {
- return;
+ RETURN_THROWS();
}
}
/* if not and the object implements Countable we call its count() method */
if (authns) {
authns = zend_try_array_init(authns);
if (!authns) {
- return;
+ RETURN_THROWS();
}
}
if (addtl) {
addtl = zend_try_array_init(addtl);
if (!addtl) {
- return;
+ RETURN_THROWS();
}
}
mx_list = zend_try_array_init(mx_list);
if (!mx_list) {
- return;
+ RETURN_THROWS();
}
if (weight_list) {
weight_list = zend_try_array_init(weight_list);
if (!weight_list) {
- return;
+ RETURN_THROWS();
}
}
if (authns) {
authns = zend_try_array_init(authns);
if (!authns) {
- return;
+ RETURN_THROWS();
}
}
if (addtl) {
addtl = zend_try_array_init(addtl);
if (!addtl) {
- return;
+ RETURN_THROWS();
}
}
} else {
ret_array = zend_try_array_init(ret_array);
if (!ret_array) {
- return;
+ RETURN_THROWS();
}
}
if (argc == 2) {
info = zend_try_array_init(info);
if (!info) {
- return;
+ RETURN_THROWS();
}
}
if (php_random_bytes_throw(ZSTR_VAL(bytes), size) == FAILURE) {
zend_string_release_ex(bytes, 0);
- return;
+ RETURN_THROWS();
}
ZSTR_VAL(bytes)[size] = '\0';
if (params) {
if (parse_context_options(context, params) == FAILURE) {
- return;
+ RETURN_THROWS();
}
}
context = FG(default_context);
if (parse_context_options(context, options) == FAILURE) {
- return;
+ RETURN_THROWS();
}
php_stream_context_to_zval(context, return_value);
if (Z_TYPE_P(from) != IS_ARRAY) {
convert_to_long_ex(from);
if (EG(exception)) {
- return;
+ RETURN_THROWS();
}
}
}
if (EG(exception)) {
- return;
+ RETURN_THROWS();
}
/* if subject is an array */
arrayArg = zend_try_array_init(arrayArg);
if (!arrayArg) {
- return;
+ RETURN_THROWS();
}
res = estrndup(arg, arglen);
}
if ((bucket = (php_stream_bucket *)zend_fetch_resource_ex(pzbucket, PHP_STREAM_BUCKET_RES_NAME, le_bucket)) == NULL) {
- return;
+ RETURN_THROWS();
}
if (NULL != (pzdata = zend_hash_str_find(Z_OBJPROP_P(zobject), "data", sizeof("data")-1)) && Z_TYPE_P(pzdata) == IS_STRING) {
if (EG(exception)) {
smart_str_free(&buf);
- return;
+ RETURN_THROWS();
}
if (buf.s) {
if (info) {
info = zend_try_array_init(info);
if (!info) {
- return;
+ RETURN_THROWS();
}
}
xdata = zend_try_array_init(xdata);
if (!xdata) {
- return;
+ RETURN_THROWS();
}
ZVAL_COPY_VALUE(&parser->data, xdata);