Make the functions validate input parameters (or lack thereof)

This commit is contained in:
Ilia Alshanetsky 2013-02-27 13:53:03 -05:00
parent d39a49a534
commit 0039f160f2

View 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;
}