mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
Fix fatal error in CLI scripts in PHP 8.4 #2513
This commit is contained in:
parent
5656189a19
commit
fed2af3d13
2 changed files with 8 additions and 3 deletions
|
|
@ -258,7 +258,12 @@ class URL
|
|||
$position = 0;
|
||||
}
|
||||
|
||||
if (function_exists('idn_to_utf8'))
|
||||
$domain = (string)$domain;
|
||||
if ($domain === '')
|
||||
{
|
||||
$new_domain = '';
|
||||
}
|
||||
elseif (function_exists('idn_to_utf8'))
|
||||
{
|
||||
$new_domain = idn_to_utf8($domain);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,13 +195,13 @@ class ModuleModel extends Module
|
|||
/**
|
||||
* @brief Get the default mid according to the domain
|
||||
*/
|
||||
public static function getDefaultMid($domain = null)
|
||||
public static function getDefaultMid($domain = '')
|
||||
{
|
||||
// Get current domain.
|
||||
$domain = $domain ? Rhymix\Framework\URL::decodeIdna($domain) : Rhymix\Framework\URL::getCurrentDomain();
|
||||
|
||||
// Find the domain information.
|
||||
$domain_info = self::getSiteInfoByDomain($domain);
|
||||
$domain_info = $domain ? self::getSiteInfoByDomain($domain) : null;
|
||||
if (!$domain_info)
|
||||
{
|
||||
$domain_info = self::getDefaultDomainInfo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue