Advertisement:

Author Topic: Undefined index: location Sources/Class-CurlFetchWeb.php Line: 153  (Read 114 times)

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,660
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Undefined index: location "Class-CurlFetchWeb.php"

Not sure why I get this error (php 7.1).

Code: [Select]
148: 'body' => $body,
149: 'size' => $curl_info['download_content_length'],
150: );
151:
152: // If this a redirect with a location header and we have not given up, then do it again
==>153: if (preg_match('~30[127]~i', $http_code) === 1 && $this->headers['location'] != '' && $this->current_redirect <= $this->max_redirect)
154: {
155: $this->current_redirect++;
156: $header_location = $this->get_redirect_url($url, $this->headers['location']);
157: $this->redirect($header_location, $url);
158: }
159: }

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,771
    • Arantor on GitHub
Re: Undefined index: location Sources/Class-CurlFetchWeb.php Line: 153
« Reply #1 on: July 12, 2018, 08:21:37 AM »
Try using a capital L in location.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.