function xhprof_admin_settings_validate in XHProf 7
Same name and namespace in other branches
- 6 xhprof.admin.inc \xhprof_admin_settings_validate()
File
- ./
xhprof.admin.inc, line 84 - Admin page callbacks for the XHProf module.
Code
function xhprof_admin_settings_validate($form, &$form_state) {
// TODO: Simplify this.
if (isset($form_state['values']['xhprof_interval']) && $form_state['values']['xhprof_interval'] != '' && (!is_numeric($form_state['values']['xhprof_interval']) || $form_state['values']['xhprof_interval'] <= 0 || $form_state['values']['xhprof_interval'] > mt_getrandmax())) {
form_set_error('xhprof_interval', 'The profiling interval must be set to a positive integer.');
}
}