diff --git a/src/Controller/Component/FloodProtectionComponent.php b/src/Controller/Component/FloodProtectionComponent.php index ff45590..a52c964 100644 --- a/src/Controller/Component/FloodProtectionComponent.php +++ b/src/Controller/Component/FloodProtectionComponent.php @@ -20,6 +20,11 @@ class FloodProtectionComponent extends Component if (!isset($_SERVER[$ip_source])) { $ip_source = 'REMOTE_ADDR'; } + if (isset($_SERVER[$ip_source])) { + $this->remote_ip = $_SERVER[$ip_source]; + } else { + $this->remote_ip = '127.0.0.1'; + } $this->remote_ip = $_SERVER[$ip_source]; $temp = explode(PHP_EOL, $_SERVER[$ip_source]); if (count($temp) > 1) {