mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Various fixes to improve PHP 8.0 compatibility
- XmlParser 클래스가 PHP 내장 클래스가 되어버려서 XeXmlParser로 변경 - 함수나 파라미터의 형태가 맞지 않아서 치명적인 오류 나는 곳 수정 - undefined 변수 및 배열 키 다수 수정 (치명적인 오류는 아님) - 계속 수정중...
This commit is contained in:
parent
90084efd75
commit
8c161bc28d
38 changed files with 136 additions and 100 deletions
|
|
@ -34,7 +34,7 @@ function config($key, $value = null)
|
|||
*/
|
||||
function lang($code, $value = null)
|
||||
{
|
||||
if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
|
||||
if (!isset($GLOBALS['lang']) || !$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
|
||||
{
|
||||
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(Context::getLangType() ?: config('locale.default_lang') ?: 'ko');
|
||||
$GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
|
||||
|
|
@ -554,7 +554,7 @@ function tobool($input)
|
|||
*/
|
||||
function countobj($array_or_object)
|
||||
{
|
||||
if (is_array($array_or_object))
|
||||
if (is_array($array_or_object) || $array_or_object instanceof Countable)
|
||||
{
|
||||
return count($array_or_object);
|
||||
}
|
||||
|
|
@ -564,7 +564,7 @@ function countobj($array_or_object)
|
|||
}
|
||||
else
|
||||
{
|
||||
return @count($array_or_object);
|
||||
return $array_or_object ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue