Skip to content

Commit 2c61091

Browse files
committed
refactor: $this->ipAddress is never emtpy
Because empty values do not pass the validation.
1 parent 52ac433 commit 2c61091

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/HTTP/RequestTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ trait RequestTrait
4444
/**
4545
* Gets the user's IP address.
4646
*
47-
* @return string IP address if it can be detected, or empty string.
47+
* @return string IP address if it can be detected.
4848
* If the IP address is not a valid IP address,
4949
* then will return '0.0.0.0'.
5050
*/
@@ -156,7 +156,7 @@ public function getIPAddress(): string
156156
return $this->ipAddress = '0.0.0.0';
157157
}
158158

159-
return empty($this->ipAddress) ? '' : $this->ipAddress;
159+
return $this->ipAddress;
160160
}
161161

162162
/**

0 commit comments

Comments
 (0)