Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ext/com_dotnet/com_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,7 @@ PHP_FUNCTION(com_create_guid)
GUID retval;
OLECHAR *guid_string;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

php_com_initialize();
if (CoCreateGuid(&retval) == S_OK && StringFromCLSID(&retval, &guid_string) == S_OK) {
Expand Down
12 changes: 3 additions & 9 deletions ext/com_dotnet/com_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ CPH_METHOD(GetCurFileName)
OLECHAR *olename = NULL;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down Expand Up @@ -457,9 +455,7 @@ CPH_METHOD(GetMaxStreamSize)
ULARGE_INTEGER size;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down Expand Up @@ -491,9 +487,7 @@ CPH_METHOD(InitNew)
HRESULT res;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down
4 changes: 1 addition & 3 deletions ext/dba/dba.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,9 +1301,7 @@ PHP_FUNCTION(dba_handlers)
/* {{{ List opened databases */
PHP_FUNCTION(dba_list)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);

Expand Down
12 changes: 3 additions & 9 deletions ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ PHP_METHOD(DOMDocument, createDocumentFragment)
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down Expand Up @@ -1251,9 +1249,7 @@ PHP_METHOD(DOMDocument, normalizeDocument)
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down Expand Up @@ -1818,9 +1814,7 @@ PHP_METHOD(DOMDocument, validate)
xmlValidCtxt *cvp;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down
4 changes: 1 addition & 3 deletions ext/dom/documentfragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ PHP_METHOD(DOMDocumentFragment, __construct)
xmlNodePtr nodep = NULL, oldnode = NULL;
dom_object *intern;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

nodep = xmlNewDocFragment(NULL);

Expand Down
4 changes: 1 addition & 3 deletions ext/dom/element.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,9 +1477,7 @@ PHP_METHOD(DOMElement, remove)
{
dom_object *intern;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_THIS_INTERN(intern);

Expand Down
4 changes: 1 addition & 3 deletions ext/enchant/enchant.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ PHP_FUNCTION(enchant_broker_init)
enchant_broker *broker;
EnchantBroker *pbroker;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

pbroker = enchant_broker_init();
if (pbroker) {
Expand Down
4 changes: 1 addition & 3 deletions ext/filter/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,7 @@ PHP_FUNCTION(filter_list)
{
int size = sizeof(filter_list) / sizeof(filter_list_entry);

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
for (int i = 0; i < size; ++i) {
Expand Down
16 changes: 4 additions & 12 deletions ext/hash/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,7 @@ PHP_FUNCTION(hash_algos)
{
zend_string *str;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
ZEND_HASH_MAP_FOREACH_STR_KEY(&php_hash_hashtable, str) {
Expand All @@ -875,9 +873,7 @@ PHP_FUNCTION(hash_hmac_algos)
zend_string *str;
const php_hash_ops *ops;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
Expand Down Expand Up @@ -1260,9 +1256,7 @@ PHP_FUNCTION(mhash_get_hash_name)
/* {{{ Gets the number of available hashes */
PHP_FUNCTION(mhash_count)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();
RETURN_LONG(MHASH_NUM_ALGOS - 1);
}
/* }}} */
Expand Down Expand Up @@ -1463,9 +1457,7 @@ PHP_METHOD(HashContext, __serialize)
zend_long magic = 0;
zval tmp;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);

Expand Down
8 changes: 2 additions & 6 deletions ext/mbstring/php_mbregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
int beg, end;
OnigUChar *str;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) {
array_init(return_value);
Expand Down Expand Up @@ -1544,9 +1542,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
/* {{{ Get search start position */
PHP_FUNCTION(mb_ereg_search_getpos)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

RETVAL_LONG(MBREX(search_pos));
}
Expand Down
4 changes: 1 addition & 3 deletions ext/mysqli/mysqli.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,7 @@ PHP_METHOD(mysqli_result, __construct)

PHP_METHOD(mysqli_result, getIterator)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

zend_create_internal_iterator_zval(return_value, ZEND_THIS);
}
Expand Down
12 changes: 3 additions & 9 deletions ext/mysqli/mysqli_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,7 @@ PHP_FUNCTION(mysqli_free_result)
PHP_FUNCTION(mysqli_get_client_info)
{
if (hasThis()) {
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();
} else {
zval *mysql_link;

Expand All @@ -878,9 +876,7 @@ PHP_FUNCTION(mysqli_get_client_info)
/* {{{ Get MySQL client info */
PHP_FUNCTION(mysqli_get_client_version)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

RETURN_LONG((zend_long)mysql_get_client_version());
}
Expand Down Expand Up @@ -1946,9 +1942,7 @@ PHP_FUNCTION(mysqli_thread_id)
/* {{{ Return whether thread safety is given or not */
PHP_FUNCTION(mysqli_thread_safe)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

RETURN_BOOL(mysql_thread_safe());
}
Expand Down
16 changes: 4 additions & 12 deletions ext/mysqli/mysqli_nonapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,7 @@ PHP_METHOD(mysqli, init)
/* {{{ Returns the numerical value of the error message from last connect command */
PHP_FUNCTION(mysqli_connect_errno)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

RETURN_LONG(MyG(error_no));
}
Expand All @@ -354,9 +352,7 @@ PHP_FUNCTION(mysqli_connect_errno)
/* {{{ Returns the text of the error message from previous MySQL operation */
PHP_FUNCTION(mysqli_connect_error)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

if (MyG(error_msg)) {
RETURN_STRING(MyG(error_msg));
Expand Down Expand Up @@ -448,9 +444,7 @@ PHP_FUNCTION(mysqli_fetch_all)
/* {{{ Returns statistics about the zval cache */
PHP_FUNCTION(mysqli_get_client_stats)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();
mysqlnd_get_client_stats(return_value);
}
/* }}} */
Expand Down Expand Up @@ -1088,9 +1082,7 @@ PHP_FUNCTION(mysqli_release_savepoint)
/* {{{ Returns information about open and cached links */
PHP_FUNCTION(mysqli_get_links_stats)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
add_assoc_long_ex(return_value, "total", sizeof("total") - 1, MyG(num_links));
Expand Down
4 changes: 1 addition & 3 deletions ext/mysqli/mysqli_warning.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ PHP_METHOD(mysqli_warning, next)
MYSQLI_WARNING *w;
mysqli_object *obj = Z_MYSQLI_P(ZEND_THIS);

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

if (obj->ptr) {
MYSQLI_FETCH_RESOURCE(w, MYSQLI_WARNING *, ZEND_THIS, MYSQLI_STATUS_VALID);
Expand Down
4 changes: 1 addition & 3 deletions ext/odbc/php_odbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,7 @@ PHP_FUNCTION(odbc_close_all)
{
zval *zv;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

/* Loop through the link list, now close all links and their results */
ZEND_HASH_FOREACH_VAL(&ODBCG(connections), zv) {
Expand Down
8 changes: 2 additions & 6 deletions ext/opcache/zend_accelerator_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,7 @@ ZEND_FUNCTION(opcache_get_configuration)
{
zval directives, version, blacklist;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

if (!validate_api_restriction()) {
RETURN_FALSE;
Expand Down Expand Up @@ -908,9 +906,7 @@ ZEND_FUNCTION(opcache_get_configuration)
/* {{{ Request that the contents of the opcode cache to be reset */
ZEND_FUNCTION(opcache_reset)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

if (!validate_api_restriction()) {
RETURN_FALSE;
Expand Down
12 changes: 3 additions & 9 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,7 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
/* {{{ Retrieve an array mapping available certificate locations */
PHP_FUNCTION(openssl_get_cert_locations)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
php_openssl_set_cert_locations(return_value);
Expand Down Expand Up @@ -4024,9 +4022,7 @@ PHP_FUNCTION(openssl_error_string)
char buf[256];
unsigned long val;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

php_openssl_store_errors();

Expand Down Expand Up @@ -4444,9 +4440,7 @@ PHP_FUNCTION(openssl_get_curve_names)
size_t i;
size_t len = EC_get_builtin_curves(NULL, 0);

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

curves = emalloc(sizeof(EC_builtin_curve) * len);
if (!EC_get_builtin_curves(curves, len)) {
Expand Down
4 changes: 1 addition & 3 deletions ext/pdo_firebird/pdo_firebird.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */

PHP_METHOD(Pdo_Firebird, getApiVersion)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

RETURN_LONG(FB_API_VER);
}
Loading
Loading