Skip to content

Commit 9518155

Browse files
committed
Add missing zend_parse_parameters_none() checks
Closes phpGH-4796.
1 parent b0cf34a commit 9518155

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

ext/hash/hash.c

+4
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@ PHP_FUNCTION(hash_hmac_algos)
616616
zend_string *str;
617617
const php_hash_ops *ops;
618618

619+
if (zend_parse_parameters_none() == FAILURE) {
620+
return;
621+
}
622+
619623
array_init(return_value);
620624
ZEND_HASH_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
621625
if (ops->is_crypto) {

ext/openssl/openssl.c

+4
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,10 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
16261626
Retrieve an array mapping available certificate locations */
16271627
PHP_FUNCTION(openssl_get_cert_locations)
16281628
{
1629+
if (zend_parse_parameters_none() == FAILURE) {
1630+
return;
1631+
}
1632+
16291633
array_init(return_value);
16301634

16311635
add_assoc_string(return_value, "default_cert_file", (char *) X509_get_default_cert_file());

ext/standard/basic_functions.c

+8
Original file line numberDiff line numberDiff line change
@@ -4636,6 +4636,10 @@ PHP_FUNCTION(print_r)
46364636
Returns true if client disconnected */
46374637
PHP_FUNCTION(connection_aborted)
46384638
{
4639+
if (zend_parse_parameters_none() == FAILURE) {
4640+
return;
4641+
}
4642+
46394643
RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED);
46404644
}
46414645
/* }}} */
@@ -4644,6 +4648,10 @@ PHP_FUNCTION(connection_aborted)
46444648
Returns the connection status bitfield */
46454649
PHP_FUNCTION(connection_status)
46464650
{
4651+
if (zend_parse_parameters_none() == FAILURE) {
4652+
return;
4653+
}
4654+
46474655
RETURN_LONG(PG(connection_status));
46484656
}
46494657
/* }}} */

ext/standard/info.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ PHP_FUNCTION(php_sapi_name)
13221322

13231323
/* }}} */
13241324

1325-
/* {{{ proto string php_uname(void)
1325+
/* {{{ proto string php_uname([ string $mode = "a"])
13261326
Return information about the system PHP was built on */
13271327
PHP_FUNCTION(php_uname)
13281328
{

ext/standard/math.c

+4
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,10 @@ PHP_FUNCTION(atanh)
570570
Returns an approximation of pi */
571571
PHP_FUNCTION(pi)
572572
{
573+
if (zend_parse_parameters_none() == FAILURE) {
574+
return;
575+
}
576+
573577
RETURN_DOUBLE(M_PI);
574578
}
575579
/* }}} */

0 commit comments

Comments
 (0)