[Notice] Undefined index: HTTP_REFERER

GET /our-school/policy/getfile/sar-form-subject-access-request

Line 242 in /homepages/43/d239514111/htdocs/hydecc/devmac-core/src/Pages/DownloadPage.php

Source

233             }
234             return $r;
235         }
236         return $files;
237     }
238     
239     public function getfile(){
240         // determine if the link is external
241         $isExternal = true ;
242         if(Director::protocolAndHost() == substr($_SERVER['HTTP_REFERER'],0,strlen(Director::protocolAndHost()))){
243             $isExternal = false ;
244         }
245         // redirect the user to the download page if they can't download externally
246         if($isExternal && !$this->AllowExternal){
247             return $this->redirect($this->Link().'?external=1');
248         }

Trace

Redirecting to https://www.hydehighschool.uk/our-school/policy/?external=1...