Skip Navigation

[Closed] Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array,

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 2 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2561823

Trying to edit a user form gives
"There has been a critical error on this website. Please check your site admin email inbox for instructions":

WordPress version 6.1.1
Thème actif : Mouvart en Bourgogne hnzz (version 3.3.2)
Extension actuelle : Toolset Forms (version 2.6.14)
PHP version 8.0.25

Détails de l’erreur
======================
Une erreur de type E_ERROR a été causée dans la ligne 135 du fichier /var/www/wptbox/wp-content/plugins/cred-frontend-editor/library/toolset/cred/classes/CRED_Admin.php. Message d’erreur : Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, string given in /var/www/wptbox/wp-content/plugins/cred-frontend-editor/library/toolset/cred/classes/CRED_Admin.php:135
Stack trace:
#0 /var/www/wptbox/wp-content/plugins/cred-frontend-editor/library/toolset/cred/classes/CRED_Admin.php(135): array_filter()
#1 /var/www/wptbox/wp-includes/class-wp-hook.php(310): CRED_Admin::saveFormCustomFields()
#2 /var/www/wptbox/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#3 /var/www/wptbox/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /var/www/wptbox/wp-includes/post.php(4717): do_action()
#5 /var/www/wptbox/wp-includes/post.php(4819): wp_insert_post()
#6 /var/www/wptbox/wp-content/plugins/automatic-image-uploader/includes/class.php(90): wp_update_post()
#7 /var/www/wptbox/wp-includes/class-wp-hook.php(308): AIU_Image_Uploader->save_post_images()
#8 /var/www/wptbox/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#9 /var/www/wptbox/wp-includes/plugin.php(517): WP_Hook->do_action()
#10 /var/www/wptbox/wp-includes/post.php(4717): do_action()
#11 /var/www/wptbox/wp-includes/post.php(4819): wp_insert_post()
#12 /var/www/wptbox/wp-admin/includes/post.php(426): wp_update_post()
#13 /var/www/wptbox/wp-admin/post.php(227): edit_post()
#14 {main}
thrown

Any help much appreciated

hnzz

#2562741

Hello,

How do you setup that "edit a user form"?

Can you take a screenshot for it? especially the section "Setting"

#2562865
Screenshot 2023-02-28 at 12.09.36.png
Screenshot 2023-02-28 at 12.08.56.png
Screenshot 2023-02-28 at 12.08.27.png
Screenshot 2023-02-28 at 11.46.37.png

I have included a screenshot of the setup and error. I can also make a screencast if that helps ...

Hans

#2563485

I have tried the same setting as your screenshot in a fresh WP installation + the latest version of Toolset plugins, it works fine, see below test site.

Login URL: hidden link

Custom user roles:
hidden link

Editing user form:
hidden link

It works fine in frontend too:
hidden link

Is there any missing steps? can you reproduce the same problem in above test site?

If you can not too, there might be other compatibility issues in your website, please try these:
deactivate all other plugins, and switch to WordPress default theme 2022, deactivate all custom PHP/JS code snippets, and test again

#2565645

Ok will try this next monday and report back after that …
Hnzz

#2566551

OK, please update here if you still need assistance for it, thanks

The topic ‘[Closed] Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array,’ is closed to new replies.