Unverified Commit 1052cac6 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3239285 by alexpott: Passing request headers to string functions causes...

Issue #3239285 by alexpott: Passing request headers to string functions causes deprecations in PHP 8.1
parent bba72c63
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $install_
    }
    asort($select_options);
    $request = Request::createFromGlobals();
    $browser_langcode = UserAgent::getBestMatchingLangcode($request->server->get('HTTP_ACCEPT_LANGUAGE'), $browser_options);
    $browser_langcode = UserAgent::getBestMatchingLangcode($request->server->get('HTTP_ACCEPT_LANGUAGE', ''), $browser_options);
    $form['langcode'] = [
      '#type' => 'select',
      '#title' => 'Choose language',
+2 −2
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ public function testFeed($use_last_modified, $use_etag, Request $request) {
    $last_modified = strtotime('Sun, 19 Nov 1978 05:00:00 GMT');
    $etag = Crypt::hashBase64($last_modified);

    $if_modified_since = strtotime($request->server->get('HTTP_IF_MODIFIED_SINCE'));
    $if_none_match = stripslashes($request->server->get('HTTP_IF_NONE_MATCH'));
    $if_modified_since = strtotime($request->server->get('HTTP_IF_MODIFIED_SINCE', ''));
    $if_none_match = stripslashes($request->server->get('HTTP_IF_NONE_MATCH', ''));

    // Send appropriate response. We respond with a 304 not modified on either
    // etag or on last modified.