Fatal error: Uncaught TypeError: array_map() bug :: php 8.2
-
Issue
I have recently enabled your plugin as well as publishpress revisions pro while using elementor and acf fields. When I try and save a revision on a page built with elementor I was receiving the following error ::
Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array)?must be of type array, string given in?/var/www/html/wp-content/plugins/relevanssi/lib/common.php:1374
That line is part of the relevanssi_filter_custom_fields function. The issue does not occur if I am not creating a revision.
The site is running on php 8.2
Work Around ::
I was able to work around the issue by setting the Custom fields indexing option to visible within the Relevanssi settings admin.
Seems like a bit of an edge case but I figured I would drop you a note about it.
Here is the stack trace ::
- array_map()
/var/www/html/wp-content/plugins/relevanssi/lib/common.php:1374 - relevanssi_filter_custom_fields()
/var/www/html/wp-includes/class-wp-hook.php:326 - WP_Hook->apply_filters()
/var/www/html/wp-includes/plugin.php:205
apply_filters()
/var/www/html/wp-content/plugins/relevanssi/lib/indexing.php:1282
relevanssi_index_custom_fields()
/var/www/html/wp-content/plugins/relevanssi/lib/indexing.php:573
relevanssi_index_doc()
/var/www/html/wp-content/plugins/relevanssi/lib/indexing.php:832
relevanssi_publish()
/var/www/html/wp-content/plugins/relevanssi/lib/indexing.php:905
relevanssi_insert_edit()
/var/www/html/wp-includes/class-wp-hook.php:326
WP_Hook->apply_filters()
/var/www/html/wp-includes/class-wp-hook.php:348
WP_Hook->do_action()
/var/www/html/wp-includes/plugin.php:517
do_action()
/var/www/html/wp-includes/post.php:5612
wp_after_insert_post()
/var/www/html/wp-includes/post.php:4905
wp_insert_post()
/var/www/html/wp-includes/post.php:4993
wp_update_post()
/var/www/html/wp-content/plugins/elementor/core/settings/page/manager.php:352
Elementor\Core\Settings\Page\Manager->save_post_status()
/var/www/html/wp-content/plugins/elementor/core/settings/page/manager.php:122
Elementor\Core\Settings\Page\Manager->ajax_before_save_settings()
/var/www/html/wp-content/plugins/elementor/core/base/document.php:1790
Elementor\Core\Base\Document->save_settings()
/var/www/html/wp-content/plugins/elementor/core/base/document.php:849
Elementor\Core\Base\Document->save()
/var/www/html/wp-content/plugins/elementor/core/documents-manager.php:549
Elementor\Core\Documents_Manager->ajax_save()
call_user_func()
/var/www/html/wp-content/plugins/elementor/core/common/modules/ajax/module.php:176
Elementor\Core\Common\Modules\Ajax\Module->handle_ajax_request()
/var/www/html/wp-includes/class-wp-hook.php:324
WP_Hook->apply_filters()
/var/www/html/wp-includes/class-wp-hook.php:348
WP_Hook->do_action()
/var/www/html/wp-includes/plugin.php:517
do_action()
/var/www/html/wp-admin/admin-ajax.php:192
{main}
- array_map()
- You must be logged in to reply to this topic.