Hi,
I'm hitting the following error on my wordpress site after upgrading to PHP 8.0.17.
This issue occurs when viewing User Profile field where user fields were created using Toolset fields.
[26-Sep-2022 10:21:26 UTC] PHP Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/lib/adodb-time.inc.php:1$
Stack trace:
#0 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/lib/adodb-time.inc.php(1048): abs()
#1 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields/date.php(320): adodb_date()
#2 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(307): wpcf_fields_date_value_get_filter()
#3 /opt/bitnami/wordpress/wp-includes/plugin.php(191): WP_Hook->apply_filters()
#4 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.field_factory.php(92): apply_filters()
#5 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.date.php(59): FieldFactory->getValue()
#6 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.form_factory.php(309): WPToolset_Field_Date->metaform()
#7 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/bootstrap.php(66): FormFactory->metaform()
#8 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/api.php(25): WPToolset_Forms_Bootstrap->field()
#9 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/types/embedded/includes/usermeta-post.php(119): wptoolset_form_field()
#10 /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/types/embedded/usermeta-init.php(221): wpcf_admin_userprofile_init()
#11 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(307): wpcf_admin_user_profile_load_hook()
#12 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#13 /opt/bitnami/wordpress/wp-includes/plugin.php(476): WP_Hook->do_action()
#14 /opt/bitnami/wordpress/wp-admin/user-edit.php(847): do_action()
#15 {main}
thrown in /opt/bitnami/wordpress/wp-content/plugins/types/vendor/toolset/toolset-common/lib/adodb-time.inc.php on line 1048
My issue is resolved by me checking all existing data for date fields and their values.
Turns out I somehow had some usermeta date values as string 🙁