Extra Form
PHP PHP 8.0
CMS Rhymix 2.1

예전 XE의 명언위젯인데, 지금까지 잘 사용하다가 PHP8 에서 실행이 되지 않아서 문의드립니다.

에러가 나는 줄을 보니 아래 빨간색 코드 입니다.

 

타운에서 검색해보니 php8 에서는  $args = new stdClass(); , $widget_info = new stdClass();  이런 코드를

넣어줘야 한다는 글들을 봤는데... 어느 위치에 넣고, 어디를 수정해야 하는지 몰라서 도움 부탁드립니다.

 

 

 

 function proc($args){
            $num = (int)$args->list_count ? (int)$args->list_count : 5;

 

            // 읽어 올 파일 경로를 지정
            $file_path = sprintf('%sskins/%s/files/%s', $this->widget_path, $args->skin, 'osho.txt');

            $widget_info->osho_list == $this->getoshoFile($file_path, $num);

            Context::set('widget_info', $widget_info);

 

            // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
            $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
            Context::set('colorset', $args->colorset);

 

            // 템플릿 파일을 지정
            $tpl_file = 'view';

 

            // 템플릿 컴파일
            $oTemplate = &TemplateHandler::getInstance();
            return $oTemplate->compile($tpl_path, 'view');
        }

 

 

  • profile
    $widget_info->osho_list == $this->getoshoFile($file_path, $num);
    이 부분이 문제인 것 같은데요.

    $widget_info = new stdClass();
    라고 미리 선언이 되어야 할 겁니다.

    그리고 == 으로 코딩되어 있나요?
    =은 하나로 충분할 것 같아요ㅎㅎ
  • profile profile

    ㅎㅎ 감사합니다. 방금 수정했더니 잘 작동합니다. 매번 좋은 자료와 좋은 팁 고맙습니다^^