Commit ac637c3f authored by tamasd's avatar tamasd Committed by tim.plunkett
Browse files

Issue #1461236 by Yorirou: Fixed Trailing space in the menu path could cause menu rebuild failure.

parent 422289b9
...@@ -552,9 +552,8 @@ function options_validate(&$form, &$form_state) { ...@@ -552,9 +552,8 @@ function options_validate(&$form, &$form_state) {
form_error($form['path'], t('"%" may not be used for the first segment of a path.')); form_error($form['path'], t('"%" may not be used for the first segment of a path.'));
} }
// automatically remove '/' from path. // automatically remove '/' and trailing whitespace from path.
$form_state['values']['path'] = trim($form_state['values']['path'], '/'); $form_state['values']['path'] = trim($form_state['values']['path'], '/ ');
break; break;
case 'menu': case 'menu':
$path = $this->get_option('path'); $path = $this->get_option('path');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment