Skip Navigation

[Resolved] WP_Post argument: ctype_digit()

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.

Our next available supporter will start replying to tickets in about 3.92 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 month ago.

Assisted by: Minesh.

Author
Posts
#2779182
Woocommerce-views.png

[There is another open ticket, and this might relate to that.
That problem is that with Toolset Types activated, opening Pages to Edit is very slow, but when Toolset Types deactivated, speed is fine - support is still working on that. ]

As part of troubleshooting, with all except security and cache plugins deactivated (i.e. all Toolset plugins deactivated too), when opening a page for edit, it takes a while and this message is repeated before the page eventually loads:

Deprecated: ctype_digit(): Argument of type WP_Post will be interpreted as string in the future in /home/golden/public_html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/factory.php on line 134
Edit Page

The code relevant code snippet in factory.php is:
if ( ! $force_query_by_name && ( ctype_digit( $field_group ) || is_int( $field_group ) ) && (int) $field_group > 0 ) {
// query by post id

When Toolset is activated, another deprecated message slows down page loading for editing - it is annoying, and time consuming. That message is about FILTER_SANITIZE_STRING being deprecated (see screenshot).
When Toolset WooCommerce Blocks is deactivate the message does not show.

Although deprecated items should not have an impact, it does slow down editing time as pages do not load immediately. The system tries is held up for 15+ times.

Is it possible to stop those messages? Or is there another solution to prevent these from interfering with editing?

#2779191

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

This is a known issue to us and our Devs already fix this with our Dev branch.

The official fix for this issue is set to release with the next Toolset plugin hotfix release which you can expect in couple of weeks from now.

To fix that for now, You will want to edit your wp-config.php file and set WP_DEBUG to false for now.