Overview of the Issue
When attempting to translate a Give – Donation plugin form, a fatal error occurs rather than opening the translation editor:
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
Workaround
This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.
Please, make sure of having a full backup of your site before proceeding.
- Open …/wp-content/plugins/give/includes/database/class-give-db-meta.php file.
- Look for line 151.
- Replace:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = ''; } - With:
if ( $this->raw_result ) { if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) { $value = array(); }
Still Seeing This Issue?
If updating doesn’t fix it, ask a support question and we’ll look into it with you.
Ask a support question