Skip to content

Commit df1dd35

Browse files
committed
Coalesce non-string values to empty string
1 parent 1035d37 commit df1dd35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Libraries/Core/GeoIP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private function __construct() {}
1919
public static function getCountryISOCode(?string $address = null): ?string
2020
{
2121
$ip = $address ?? '';
22-
if (empty($ip)) $ip = \getenv('REMOTE_ADDR');
22+
if (empty($ip)) $ip = \getenv('REMOTE_ADDR') ?? '';
2323

2424
$record = self::getRecord($ip);
2525
if (!$record) return null;

0 commit comments

Comments
 (0)