Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string
-
Hi P?r,
do you have any idea what the source of this issue could be. I noticed it recently, and it might be related to the latest update 4.15.1. However, I can’t be sure, as I can’t always reproduce it.
I get the following error when editing content, e.g. update a product or a update post of a custom post type. It seems to be related to Simple History and ACF.
I downgraded to 4.14. and that seems to solve it, however – after some trials, I can currently not reproduce it again with 4.15.1 either. So it seems sometimes it works, sometimes it doesn’t and throws the error which makes it difficult to narrow things down
I currently have 2 identical systems in place, one with 4.14, one with 4.15.1
An error of type E_ERROR was caused in line 491 of the file /usr/www/users/username/foldername/wp-content/plugins/simple-history/loggers/class-plugin-acf-logger.php. Error message: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in /usr/www/users/username/foldername/wp-content/plugins/simple-history/loggers/class-plugin-acf-logger.php:491 Stack trace: #0 /usr/www/users/username/foldername/wp-content/plugins/simple-history/loggers/class-plugin-acf-logger.php(491): strpos() #1 /usr/www/users/username/foldername/wp-content/plugins/simple-history/loggers/class-plugin-acf-logger.php(224): Simple_History\Loggers\Plugin_ACF_Logger->keep_only_acf_stuff_in_array() #2 /usr/www/users/username/foldername/wp-includes/class-wp-hook.php(324): Simple_History\Loggers\Plugin_ACF_Logger->on_acf_save_post() #3 /usr/www/users/username/foldername/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #4 /usr/www/users/username/foldername/wp-includes/plugin.php(517): WP_Hook->do_action() #5 /usr/www/users/username/foldername/wp-content/plugins/advanced-custom-fields-pro/includes/acf-form-functions.php(143): do_action() #6 /usr/www/users/username/foldername/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-post.php(318): acf_save_post() #7 /usr/www/users/username/foldername/wp-includes/class-wp-hook.php(326): ACF_Form_Post->save_post() #8 /usr/www/users/username/foldername/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #9 /usr/www/users/username/foldername/wp-includes/plugin.php(517): WP_Hook->do_action() #10 /usr/www/users/username/foldername/wp-includes/post.php(4828): do_action() #11 /usr/www/users/username/foldername/wp-includes/post.php(4930): wp_insert_post() #12 /usr/www/users/username/foldername/wp-admin/includes/post.php(453): wp_update_post() #13 /usr/www/users/username/foldername/wp-admin/post.php(227): edit_post() #14 {main} thrown
- You must be logged in to reply to this topic.