We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94c06b1 commit 52ac433Copy full SHA for 52ac433
1 file changed
system/HTTP/RequestTrait.php
@@ -73,6 +73,11 @@ public function getIPAddress(): string
73
74
$this->ipAddress = $this->getServer('REMOTE_ADDR');
75
76
+ // If this is a CLI request, $this->ipAddress is null.
77
+ if ($this->ipAddress === null) {
78
+ return $this->ipAddress = '0.0.0.0';
79
+ }
80
+
81
if ($proxyIPs) {
82
// @TODO Extract all this IP address logic to another class.
83
foreach ($proxyIPs as $proxyIP => $header) {
0 commit comments