php8 에러

Extra Form
PHP PHP 8.2
CMS Rhymix 2.1

안녕하세요. php 8.2 업데이트이 후 에러로그를 차근차근히 고쳐보려고합니다.

 

/www/widgets/ap_menu_search/ap_menu_search.class.php on line 388
 

        function getASCII($ch)
        {
            $len = strlen($ch);
            if ( $len <= 0 ) return false;
            $h = ord($ch{0});
            if ( $h <= 0x7F ) return $h;
            if ( $h < 0xC2 ) return false;
            if ( $h <= 0xDF && $len > 1 ) return ($h & 0x1F) <<  6 | (ord($ch{1}) & 0x3F);
            if ( $h <= 0xEF && $len > 2 ) return ($h & 0x0F) << 12 | (ord($ch{1}) & 0x3F) << 6 | (ord($ch{2}) & 0x3F);
            if ( $h <= 0xF4 && $len > 3 ) return ($h & 0x0F) << 18 | (ord($ch{1}) & 0x3F) << 12 | (ord($ch{2}) & 0x3F) << 6 | (ord($ch{3}) & 0x3F);
            return false;
        }

 

388라인은 위와같습니다. 혹시 어떤 부분을 수정해야할지 조언 구합니다.

 

 

추가로 애드온 에러가나서 새글 알리미 애드온은 삭제해버리긴 했는데 

 

#0 "Attempt to assign property "list_count" on null" in addons/new_document_notify/new_document_notify.addon.php on line 21
#0 /home/계정/www/files/cache/addons/pc.php(390): include()
#1 /home/계정/www/classes/module/ModuleObject.class.php(724): include()
#2 /home/계정/www/classes/module/ModuleHandler.class.php(697): ModuleObject->proc()
#3 /home/계정/www/index.php(52): ModuleHandler->procModule()

 

 

 

 

 

    if($called_position == 'before_module_proc') {
        $is_document_new = false;
        if(!$addon_info->settime){
            $time_interval = 60; //글 체크 주기 초단위
            $settimeout = 60000;
        }else{
            $time_interval = $addon_info->settime;
            $settimeout = $time_interval*1000;
        }
        if(!$addon_info->hidetime) $hide_time = 3000;
        else $hide_time = $addon_info->hidetime * 1000;
        if(!$addon_info->ajaxtarget) $ajax_target = '';
        else $ajax_target = '?mid='.$addon_info->ajaxtarget;
        $time_check = date("YmdHis", time()-$time_interval);
        $args->list_count = 1;
        $args->order_type = 'asc';
        $args->statusList = 'PUBLIC';
        if(isset($addon_info->exclude_module_srl)) $args->exclude_module_srl = $addon_info->exclude_module_srl;
        $args->module_srl = $addon_info->module_srl;
        $output = executeQueryArray('document.getDocumentList', $args);
        if(!count($output->data)) return;
        if($output->data)

 

21번라인은 여기입니다.

 

저도 방법을 찾는 중이니 해결되면 댓글에 해결방법을 적어 두겠습니다!

  • profile

    우선$h = ord($ch{0}); 는

     

            function getASCII($ch)
            {
                $len = strlen($ch);
                if ( $len <= 0 ) return false;
                $h = ord($ch[0]);
                if ( $h <= 0x7F ) return $h;
                if ( $h < 0xC2 ) return false;
                if ($h <= 0xDF && $len > 1) return ($h & 0x1F) << 6 | (ord($ch[1]) & 0x3F);
                if ($h <= 0xEF && $len > 2) return ($h & 0x0F) << 12 | (ord($ch[1]) & 0x3F) << 6 | (ord($ch[2]) & 0x3F);
                if ($h <= 0xF4 && $len > 3) return ($h & 0x0F) << 18 | (ord($ch[1]) & 0x3F) << 12 | (ord($ch[2]) & 0x3F) << 6 | (ord($ch[3]) & 0x3F);
                return false;
            }

    로 해결 하였습니다.

  • profile
    $args->list['count'] = 1;
    이건 이렇게 우선 지하철이라 적용 후기는 2시간 후에 올리겠습니다
  • profile
    $args 변수를 사용하기 전에는 반드시 stdClass 클래스로 초기화해야 합니다.

    $args = new stdClass();
  • profile profile

    $args = new stdClass();로 

    수정없이 바로 해결되었습니다 감사합니다!