From: Ilia Alshanetsky Date: Wed, 27 Feb 2013 18:53:03 +0000 (-0500) Subject: Make the functions validate input parameters (or lack thereof) X-Git-Tag: php-5.5.0beta1~42^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0039f160f259dc230fa1979a3fd1c01248b309ad;p=php Make the functions validate input parameters (or lack thereof) --- diff --git a/zend_accelerator_module.c b/zend_accelerator_module.c index 04133f64b6..ba989429a2 100644 --- a/zend_accelerator_module.c +++ b/zend_accelerator_module.c @@ -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; }