]> granicus.if.org Git - php/commitdiff
Make the functions validate input parameters (or lack thereof)
authorIlia Alshanetsky <ilia@ilia.ws>
Wed, 27 Feb 2013 18:53:03 +0000 (13:53 -0500)
committerIlia Alshanetsky <ilia@ilia.ws>
Wed, 27 Feb 2013 18:53:03 +0000 (13:53 -0500)
zend_accelerator_module.c

index 04133f64b657bb3974525be393184cf4863dca01..ba989429a280e5241b22add24e9123eb2fc7cd78 100644 (file)
@@ -466,6 +466,10 @@ static ZEND_FUNCTION(accelerator_get_status)
        /* keep the compiler happy */
        (void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
 
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
+       
        if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
                RETURN_FALSE;
        }
@@ -521,6 +525,10 @@ static ZEND_FUNCTION(accelerator_get_configuration)
        /* keep the compiler happy */
        (void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
 
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
+
        array_init(return_value);
 
        /* directives */
@@ -578,6 +586,10 @@ static ZEND_FUNCTION(accelerator_reset)
        /* keep the compiler happy */
        (void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
 
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
+
        if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
                RETURN_FALSE;
        }