Persons module + $sessions code
On Line 240
Undefined indexes are appearing in Drupal 7.17:
Notice: Undefined index: recent_search in persons_init() (line 240 of /var/www/drupal7/sites/all/modules/persons/persons.module).
Notice: Undefined index: store_search_history in persons_save_search_submit() (line 55 of /var/www/drupal7/sites/all/modules/persons/persons.module).
Notice: Undefined index: recent_search in persons_init() (line 240 of /var/www/drupal7/sites/all/modules/persons/persons.module).
Line 55 is the following:
return;
}
After adding to store history the line 55 error disappeared.
These are the errors the coder module returned:
"
Line 191: Potential problem: drupal_set_message() only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
drupal_set_message($message);
severity: criticalLine 240: Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs)
drupal_set_message(t('You recently searched for: ') . $_SESSION['recent_search']);
severity: normalLine 240: The $string argument to t() should not begin or end with a space. (Drupal Docs)
drupal_set_message(t('You recently searched for: ') . $_SESSION['recent_search']); "
The coder upgrade module is unchecked. I reviewed drupal docs and it is over my head.
P.S. I have not reviewed much of the PHP chapters. Will do so in the coming weeks.
As a side note:
I'm using a Turnkey Linux virtual box. The Webmin says something about XSS security update to prevent vulnerabilities. Don't think it should case a problem with 7.17. I will also read the change history in
7.17. Maybe, I'm missing a new procedure for drupal_set_message.