diff -u b/core/includes/bootstrap.inc b/core/includes/bootstrap.inc --- b/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -581,12 +581,6 @@ * equivalent using other environment variables. * * @todo The above comment is incorrect: http://drupal.org/node/1547294. - * - * NB This function is intended for limited use, in cases before the $container - * is available. Use $request->getRequestUri() whereever possible. - * - * @return string - * The request URI */ function request_uri($omit_query_string = FALSE) { if (isset($_SERVER['REQUEST_URI'])) { @@ -604,6 +598,12 @@ * equivalent using other environment variables. * * @todo The above comment is incorrect: http://drupal.org/node/1547294. + * + * NB This function is intended for limited use, in cases before the $container + * is available. Use $request->getRequestUri() whereever possible. + * + * @return string + * The request URI */ function request_uri($omit_query_string = FALSE) { if (isset($_SERVER['REQUEST_URI'])) { diff -u b/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php --- b/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -301,7 +301,7 @@ $form['#build_id'] = 'form-' . Crypt::randomBytesBase64(); } - // #action defaults to request_uri(), but in case of Ajax and other partial + // #action defaults to $request->getRequestUri(), but in case of Ajax and other partial // rebuilds, the form is submitted to an alternate URL, and the original // #action needs to be retained. if (isset($old_form['#action']) && !empty($rebuild_info['copy']['#action'])) {