#3108 closed task (fixed)
osgeo wordpress throwing errors operator not supported for strings
Reported by: | robe | Owned by: | cvvergara |
---|---|---|---|
Priority: | normal | Milestone: | Sysadmin Contract 2024-II |
Component: | WebSite | Keywords: | |
Cc: |
Description
I got this error notice emailed to me from wordpress
An error of type E_ERROR was caused in line 207 of the file /var/www/osgeo.org/httpdocs/wp-content/themes/roots/lib/custom.php. Error message: Uncaught Error: [] operator not supported for strings in /var/www/osgeo.org/httpdocs/wp-content/themes/roots/lib/custom.php:207 Stack trace: #0 /var/www/osgeo.org/httpdocs/core/wp-includes/class-wp-hook.php(324): syncUsersForProject() #1 /var/www/osgeo.org/httpdocs/core/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #2 /var/www/osgeo.org/httpdocs/core/wp-includes/plugin.php(517): WP_Hook->do_action() #3 /var/www/osgeo.org/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-form-functions.php(143): do_action() #4 /var/www/osgeo.org/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-post.php(328): acf_save_post() #5 /var/www/osgeo.org/httpdocs/core/wp-includes/class-wp-hook.php(326): ACF_Form_Post->save_post() #6 /var/www/osgeo.org/httpdocs/core/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /var/www/osgeo.org/httpdocs/core/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /var/www/osgeo.org/httpdocs/core/wp-includes/post.php(4760): do_ac
As I recall I think this is caused by a change in newer PHP, so we probably have some old php code in our theme that needs fixing. As I recall I think this happens if you try to treat a string formatted as an array as an array. Old PHP silently accepts it and new php doesn't.
I'm not sure what triggered this error though as it doesn't give me enough detail for that.
@cvvergara I have assigned to you since you have the most experience with wordpress.
This might be related to some of the other mysterious complaints we've gotten with people getting errors when trying to edit project pages.
Sounds like you might have fixed this one as part of #3094 so feel free to close this out too if you've already deployed to production.