mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Make the functions validate input parameters (or lack thereof)
This commit is contained in:
parent
d39a49a534
commit
0039f160f2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user