Skip to content
Snippets Groups Projects
Commit a539a3aa authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#56457, unnessary trim(). patch by Zen

parent f3be5516
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1014,10 +1014,9 @@ function search_form_validate($form_id, $form_values) {
*/
function search_form_submit($form_id, $form_values) {
$keys = $form_values['processed_keys']['#ref'];
if (trim($keys) == '') {
if ($keys == '') {
form_set_error('keys', t('Please enter some keywords.'));
// Fall through to the drupal_goto() call.
$keys = '';
}
$type = $form_values['module'] ? $form_values['module'] : 'node';
......
......@@ -1014,10 +1014,9 @@ function search_form_validate($form_id, $form_values) {
*/
function search_form_submit($form_id, $form_values) {
$keys = $form_values['processed_keys']['#ref'];
if (trim($keys) == '') {
if ($keys == '') {
form_set_error('keys', t('Please enter some keywords.'));
// Fall through to the drupal_goto() call.
$keys = '';
}
$type = $form_values['module'] ? $form_values['module'] : 'node';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment