diff -u b/redirect.admin.inc b/redirect.admin.inc --- b/redirect.admin.inc +++ b/redirect.admin.inc @@ -818,7 +818,10 @@ */ function redirect_settings_form_validate($form, &$form_state) { if ($form_state['values']['redirect_global_deslash'] && $form_state['values']['redirect_global_add_slash']) { - form_set_error('info', t('You can not have both %deslash and %add_slash enabled.', array('%deslash' => rtrim($form['globals']['redirect_global_deslash']['#title'], '.'), '%add_slash' => rtrim($form['globals']['redirect_global_add_slash']['#title'], '.')))); + form_set_error('info', t('You can not have both %deslash and %add_slash enabled.', [ + '%deslash' => rtrim($form['globals']['redirect_global_deslash']['#title'], '.'), + '%add_slash' => rtrim($form['globals']['redirect_global_add_slash']['#title'], '.'), + ])); } } diff -u b/redirect.module b/redirect.module --- b/redirect.module +++ b/redirect.module @@ -384,7 +384,7 @@ if (variable_get('redirect_global_clean', 1) && variable_get('clean_url', 0) && strpos(request_uri(), '?q=') !== FALSE) { - redirect_redirect((object) array('redirect' => $request_uri, 'type' => 'global')); + redirect_redirect((object) array('redirect' => $request_uri, 'type' => 'global')); } if (strpos($request_uri, 'index.php') !== FALSE) { @@ -405,12 +405,12 @@ if (variable_get('redirect_global_deslash', 0) && substr($request_uri, -1) == '/' && $request_uri !== $alias) { - redirect_redirect( - (object) array( - 'redirect' => rtrim($request_uri, '/'), - 'type' => 'global', - ) - ); + redirect_redirect( + (object) array( + 'redirect' => rtrim($request_uri, '/'), + 'type' => 'global', + ) + ); } // Add slash (Add trailing slashes to paths). elseif (variable_get('redirect_global_add_slash', 0) @@ -1592,6 +1592,7 @@ 'redirect_global_add_slash' => 0, 'redirect_global_admin_paths' => 0, 'redirect_global_language_prefix' => 0, + 'redirect_global_case_sensitive' => 0, ); } diff -u b/redirect.test b/redirect.test --- b/redirect.test +++ b/redirect.test @@ -342,7 +342,10 @@ $this->assertRedirect($redirect); } - function testCaseSensitiveUrls() { + /** + * Test case sensitive redirects. + */ + public function testCaseSensitiveUrls() { // Create a page node with a path alias. $node = $this->drupalCreateNode(array('type' => 'page', 'path' => array('alias' => 'test-node'))); @@ -361,2 +364,3 @@ } + }