문제 개요
Contact Form 7 Multilingual 플러그인을 사용하는 경우, 번역된 문의 양식이 포함된 페이지를 볼 때 PHP 경고가 표시될 수 있습니다. 경고 내용은 다음과 같습니다:
Warning: Undefined array key "title" in /path-to-website/wp-content/plugins/contact-form-7/includes/contact-form-functions.php on line 239
임시 해결 방법
이 문제는 Contact Form 7 Multilingual 1.2.2에서 해결되었습니다. 업데이트하면 사이트에서 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.
진행하기 전에 사이트의 전체 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/contact-form-7-multilingual/classes/shortcodes.php 파일을 여세요.
- 다음 코드를 찾으세요:
if ( ! $form && ! empty( $atts['title'] ) ) { $form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) ); unset( $atts['title'] ); } - 30번째 줄을 주석 처리하세요:
if ( ! $form && ! empty( $atts['title'] ) ) { $form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) ); //unset( $atts['title'] ); }