문제 개요
PHP 8.1 이상 환경에서 번역이 복제본인 경우 Advanced Custom Fields 리피터 필드를 업데이트할 때 치명적인 오류가 발생할 수 있습니다.
PHP Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in .../wp-content/plugins/acfml/classes/class-wpml-acf-repeater-shuffle.php:175
임시 해결 방법
이 문제는 Advanced Custom Fields Multilingual 2.1.4에서 해결되었습니다. 업데이트하면 사이트에서 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.
진행하기 전에 전체 사이트 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/acfml/classes/class-wpml-acf-repeater-shuffle.php 파일을 여세요.
- 24번째 줄을 찾으세요.
- 다음 코드를:
PHP
private $meta_data_after_move;
- 다음과 같이 교체하세요:
PHP
private $meta_data_after_move = [];