Fix potential type errors in Context class

This commit is contained in:
Kijin Sung 2023-10-03 15:22:04 +09:00
parent 41febdd7ca
commit a1c6f7a902

View file

@ -1056,7 +1056,7 @@ class Context
*/ */
public static function encodeIdna($domain) public static function encodeIdna($domain)
{ {
return Rhymix\Framework\URL::encodeIdna($domain); return Rhymix\Framework\URL::encodeIdna((string)$domain);
} }
/** /**
@ -1067,7 +1067,7 @@ class Context
*/ */
public static function decodeIdna($domain) public static function decodeIdna($domain)
{ {
return Rhymix\Framework\URL::decodeIdna($domain); return Rhymix\Framework\URL::decodeIdna((string)$domain);
} }
/** /**
@ -1517,7 +1517,7 @@ class Context
{ {
return; return;
} }
if (Rhymix\Framework\Filters\IpFilter::inRanges(RX_CLIENT_IP, config('lock.allow'))) if (Rhymix\Framework\Filters\IpFilter::inRanges(RX_CLIENT_IP, config('lock.allow') ?: []))
{ {
return; return;
} }
@ -2570,7 +2570,7 @@ class Context
*/ */
public static function getConfigFile() public static function getConfigFile()
{ {
return RX_BASEDIR . Rhymix\Framework\Config::$old_db_config_filename; return RX_BASEDIR . Rhymix\Framework\Config::OLD_DB_CONFIG_PATH;
} }
/** /**
@ -2580,7 +2580,7 @@ class Context
*/ */
public static function getFTPConfigFile() public static function getFTPConfigFile()
{ {
return RX_BASEDIR . Rhymix\Framework\Config::$old_ftp_config_filename; return RX_BASEDIR . Rhymix\Framework\Config::OLD_FTP_CONFIG_PATH;
} }
/** /**