WPML
Stato
In attesa dell’autore
Plugin/tema correlato
Give - Donation Plugin
Tag dell’argomento
Compatibility

Panoramica del problema

Quando provi a tradurre un modulo del plugin Give – Donation, si verifica un errore fatale invece di aprire l’Editor di traduzione:

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

Soluzione alternativa

Assicurati di avere un backup completo del tuo sito prima di procedere.


  • Apri il file …/wp-content/plugins/give/includes/database/class-give-db-meta.php.

  • Cerca la riga 151.

  • Sostituisci:
    		if ( $this->raw_result ) {
    			if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) {
    				$value = '';
    			}
  • Con:
    		if ( $this->raw_result ) {
    			if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) {
    				$value = array();
    			}

Tutti i problemi noti →