- Status
- Aguardando o autor
- Plugin/tema relacionado
- Give - Donation Plugin
- Tags de tópico
- Compatibility
Visão geral do problema
Ao tentar traduzir um formulário do plugin Give – Donation, ocorre um erro fatal em vez de abrir o editor de tradução:
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
Solução alternativa
Por favor, certifique-se de ter um backup completo do seu site antes de prosseguir.
- Abra o arquivo …/wp-content/plugins/give/includes/database/class-give-db-meta.php.
- Procure a linha 151.
- Substitua:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = ''; } - Por:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = array(); }