- 状态
- 等待作者
- 相关插件/主题
- 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(); }