function variablecheck_check_variables_page in Variable Check 6
Helper that tries to display all variables that fail to unserialize, causing ugly Notices on production sites.
1 string reference to 'variablecheck_check_variables_page'
- variablecheck_menu in ./
variablecheck.module - Implementation of hook_menu().
File
- ./
variablecheck.module, line 66
Code
function variablecheck_check_variables_page() {
// Load the naughty variables.
$header = array(
t('Name'),
t('Value'),
);
$rows = variablecheck_check_variables();
drupal_set_title(t('Invalid Variables'));
if ($count = count($rows)) {
drupal_set_message(format_plural($count, 'Found one invalid entry', 'Found @count invalid entries'), 'error');
$output = format_plural($count, 'You will want to either remove this entry or let the module developer know there is a problem with their module.', 'You will want to either remove these entries or let the module developer know there is a problem with their module.');
$output .= theme('table', $header, $rows);
}
else {
$output = t('No invalid entries were found in the variable table.');
}
return $output;
}