Skip to content

Commit

Permalink
Fixed Notice:
Browse files Browse the repository at this point in the history
PHP Notice:  Undefined index: IP_ADDRESS in /opt/crm/vendor/yetiforce/csrf-magic/src/Csrf.php on line 261
  • Loading branch information
mariuszkrzaczkowski committed Feb 5, 2021
1 parent aaae496 commit f0da3a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static function getTokens()
// the cookies "stick"
$secret = static::getSecret();
if (!$hasCookies && $secret) {
$ip = ';ip:' . static::hash($_SERVER['IP_ADDRESS']);
$ip = ';ip:' . static::hash($_SERVER['REMOTE_ADDR']);
} else {
$ip = '';
}
Expand Down

0 comments on commit f0da3a6

Please sign in to comment.