Skip to content

Commit

Permalink
Merge pull request #2 from AgID/fix/deprecation-warn
Browse files Browse the repository at this point in the history
fix: depraction warining for PHP8
  • Loading branch information
pdavide authored Sep 18, 2023
2 parents 4dd097b + 73b3cc0 commit 1d3aec1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RestrictAnonymousAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ protected function isAllowedRequest()
{
$allowedReferrers = $this->getAllowedReferrers();
$referrer = Common::sanitizeInputValues(@$_SERVER['HTTP_REFERER']);
// Fix for deprecation error in PHP8
if(empty($referrer)) return false;
$referrerQuery = parse_url($referrer, PHP_URL_QUERY);
$referrerHost = parse_url($referrer, PHP_URL_HOST);
$piwikHost = parse_url(SettingsPiwik::getPiwikUrl(), PHP_URL_HOST);
Expand Down

0 comments on commit 1d3aec1

Please sign in to comment.