- 상태
- 해결됨
- 보고된 제품
- WPML Multilingual CMS 4.6.2
- 관련 플러그인/테마
- The Events Calendar
- 주제 태그
- Compatibility
문제 개요
PHP8+ 및 The Events Calendar를 사용 중인 경우, 번역된 이벤트 및 해당 아카이브 페이지에서 치명적인 오류가 표시됩니다:
PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in …/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:46
임시 해결 방법
진행하기 전에 사이트를 전체 백업하세요.
- …/wp-content/plugins/the-events-calendar/src/Tribe/Integrations/WPML/Views/V2/Filters.php 파일을 여세요.
- 188번 줄을 찾으세요.
- 다음을:
$event->permalink = apply_filters( 'wpml_permalink', $event->permalink );
다음으로 교체하세요:// WPML Workaround for compsupp-6706 $event_permalink = $event->permalink; if ( is_object($event_permalink) ) { $event_permalink = (string)$event_permalink; } $event->permalink = apply_filters( 'wpml_permalink', $event_permalink );