- ステータス
- 開発者からの返答待ち
- 関連するプラグイン/テーマ
- Give - Donation Plugin
- トピックタグ
- Compatibility
問題の概要
Give – Donationプラグインのフォームを翻訳しようとすると、翻訳エディタが開かずに致命的なエラーが発生します。
PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, string given in .../wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php:318
回避策
続行する前に、サイトの完全なバックアップを取得していることを確認してください。
- …/wp-content/plugins/give/includes/database/class-give-db-meta.phpファイルを開きます。
- 151行目を探します。
- 以下のコードを:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = ''; } - 次のように置き換えます:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = array(); }