Q&A

content 위젯의 문제

2024.01.03 05:25
107
0
CMS/프레임워크 Rhymix 2.1
개발 언어 PHP 8.3
문제 페이지 주소 비공개 (작성 후 5일 경과)

언론 매체의 RSS를 이용하기 위해 만든 페이지입니다.

그동안 이상 없이 열렸는데
PHP 8.3.1을 update 하고 며칠 경과한 후, 아래와 같이 Server Error만  나타납니다.

 

어디를 어떻게 수정해야 하는지요?
고수님들의 조언을 부탁합니다.

 

TypeError #0 "count(): Argument #1 ($value) must be of type Countable|array, null given" in C:\APM_Server\Apache24\htdocs\xe\widgets\content\content.class.php on line 397

 

This code is trying to use an array function on something that is not an array. This coding style was often used in the past, but it is not allowed in recent versions of PHP. Please fix the incorrect code by consulting the file name and line number shown above.

 

content error window.JPG

댓글 2

  • 2024.01.03 06:01 #1801880
    Rss 가져오는 위젯이 활용빈도가 줄다보니 그동안 알려지지 않았던 모양이네요.
    https://github.com/rhymix/rhymix/blob/7a7cdb6389072d624abb8e324653811b5ef3df0f/widgets/content/content.class.php#L397
    해당파일의 397행을
    if(!empty($content_item))
    로 바꿔보세요.
  • 2024.01.03 06:16 #1801886
    윤삼 님께서 말씀하신 대로 397행을 바꾸었더니
    제대로 보입니다.

    감사합니다.