Waiting for author
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
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(); }
Hi, I am having the same issue and tried your workaround. This caused the following error message to appear on the donation form. Warning: Undefined array key 0 in /home/httpd/vhosts/internationalbluecross.org/httpdocs/wp-includes/meta.php on line 638
My website is internationalbluecross.org It is running on php version 8.1.23
Thanks for any further help, Sabra
Hello Sabra,
If the workaround is not working for you or you are experiencing a side effect, please open a chat in our support. In that way, one of our specialists can investigate your case.
Regards
Hi Andrés,
I appreciate your reply. I will do that.
Kindly,
Sabra
Thank you very much, Sabra.
Have a nice day!
I have tha same issue.
The give form in Arabic language not work.
I try the same workaround and do not fix. And recieve the same error msg:
PHP Warning: Undefined array key 0 in /home/wp-includes/meta.php on line 638
Hello Jony,
It seems like a different error. Please open a chat in our support channel, in that way we can investigate your case.
Regards