]> granicus.if.org Git - php/commitdiff
Add missing zend_parse_parameters_none() checks
authorGabriel Caruso <carusogabriel34@gmail.com>
Mon, 7 Oct 2019 23:27:38 +0000 (01:27 +0200)
committerGabriel Caruso <carusogabriel34@gmail.com>
Tue, 8 Oct 2019 21:10:18 +0000 (23:10 +0200)
Closes GH-4796.

ext/hash/hash.c
ext/openssl/openssl.c
ext/standard/basic_functions.c
ext/standard/info.c
ext/standard/math.c

index 8247561758816cf3a7ebab086b91f7ea3bbcbfcc..6b869affdea7f5349c1e84da81ff25fb452313ac 100644 (file)
@@ -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) {
index d342f1e71ad6c148acf243287b5131f7dbe90bef..912c57f709f286e375f680adf45188d00be3b7f4 100644 (file)
@@ -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());
index 921c7042885124ab6b65467889e17cc6e8000935..01071dd244ff1cd36f773dd3b10216fd32297101 100755 (executable)
@@ -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);
 }
 /* }}} */
@@ -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));
 }
 /* }}} */
index 81bd897a25c448f9e86ba7d5a5f6e3ae51291a7e..bb3c71d9b5f73c532dd568a1be0ef077201888a5 100644 (file)
@@ -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)
 {
index f903615d7575df24cba036206d52747631fa3914..b2e56f5a272f4cc0ff163464ab5e2fa10d8bb649 100644 (file)
@@ -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);
 }
 /* }}} */