Skip to content

Add missing zend_parse_parameters_none() checks #4796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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: 4 additions & 0 deletions ext/hash/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,10 @@ PHP_FUNCTION(hash_hmac_algos)
zend_string *str;
const php_hash_ops *ops;

if (zend_parse_parameters_none() == FAILURE) {
return;
}

array_init(return_value);
ZEND_HASH_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
if (ops->is_crypto) {
Expand Down
4 changes: 4 additions & 0 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,10 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
Retrieve an array mapping available certificate locations */
PHP_FUNCTION(openssl_get_cert_locations)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}

array_init(return_value);

add_assoc_string(return_value, "default_cert_file", (char *) X509_get_default_cert_file());
Expand Down
8 changes: 8 additions & 0 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -4636,6 +4636,10 @@ PHP_FUNCTION(print_r)
Returns true if client disconnected */
PHP_FUNCTION(connection_aborted)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}

RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED);
}
/* }}} */
Expand All @@ -4644,6 +4648,10 @@ PHP_FUNCTION(connection_aborted)
Returns the connection status bitfield */
PHP_FUNCTION(connection_status)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}

RETURN_LONG(PG(connection_status));
}
/* }}} */
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ PHP_FUNCTION(php_sapi_name)

/* }}} */

/* {{{ proto string php_uname(void)
/* {{{ proto string php_uname([ string $mode = "a"])
Return information about the system PHP was built on */
PHP_FUNCTION(php_uname)
{
Expand Down
4 changes: 4 additions & 0 deletions ext/standard/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@ PHP_FUNCTION(atanh)
Returns an approximation of pi */
PHP_FUNCTION(pi)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}

RETURN_DOUBLE(M_PI);
}
/* }}} */
Expand Down