Hi, we see the following warning:
Deprecated: ctype_digit(): Argument of type WP_Post will be interpreted as string in the future in /home/***/public_html/***/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/factory.php on line 134
The WordPress version we use is 6.4.2
The PHP version is 8.1.26
Toolset version is 3.5.1
Here is the function in factory.php :
final protected function get_post( $field_group, $force_query_by_name = false ) {
$fg_post = null;
// when $force_query_by_name is not used, check if a post id is given
Line 134 --->>> if ( ! $force_query_by_name && ( ctype_digit( $field_group ) || is_int( $field_group ) ) && (int) $field_group > 0 ) {
// query by post id
$fg_post = $this->wp_post_factory->load( $field_group );
} else if ( $fg_post = $this->get_field_group_by_name( $field_group ) ) {
// field group found
return $fg_post;
} else if ( $rfg_post = $this->get_repeatable_field_group_by_name( $field_group ) ) {
// rfg found
return $rfg_post;
} else {
// object is already given
$fg_post = $field_group;
}
Thanks for reporting this. I see where in the code this can trigger the deprecation notice (passing a WP_Post object to the get_post function rather than a string with the post ID).
I have reported this to the developers, and it should be an easy fix we can include in Types, likely in the next release.
In the meantime, note that this has no effect on the functionality of your site.