WPML
상태
해결됨
보고된 제품
Advanced Custom Fields Multilingual 1.10.4
해결된 버전
2.0.0
관련 플러그인/테마
Advanced Custom Fields (ACF)
주제 태그
Compatibility

문제 개요

PHP 8.0을 사용하는 서버에서 ACF 및 WPML을 사용할 때, 옵션 페이지에 표시되도록 필드 그룹을 설정하면 다음 오류가 나타납니다:

Warning: Trying to access array offset on value of type null in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php on line 184
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/strategy.php on line 126

하나의 활성 언어로만 WPML을 설치하는 것은 권장하지 않으니 유의하세요.

임시 해결 방법

진행하기 전에 사이트를 전체 백업했는지 확인하세요.


  1. /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php 파일을 편집하세요.

  2. 184번 줄로 이동하세요.

  3. 다음 코드를:
    return $this->element_translations[ $id ];

    다음으로 교체하세요:

    return $this->element_translations[ $id ] ?? [];

알려진 모든 문제 →