Skip Navigation

[Resolved] PHP 7.2 warning issue in toolset.function.helpers

This support ticket is created 6 years, 9 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
- 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)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by bobA-2 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#624007

Hi I am testing PHP 7.2 and I am seeing PHP Warnings: A non-numeric value encountered in /home/mysite/public_html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/toolset.function.helpers.php on line 193

Hope you can fix in next version?

#624146

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Could you please confirm which Types plugin version you are using and where exactly you see this warning?

Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#624168

Using Types Version: 2.2.22 and the error is shown in the server error.log and not in WordPress it self. I think there was a change in PHP 7.1 in this area.

#624188

Minesh
Supporter

Languages: English (English )

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

Ok but do you have any idea when the warning added to your error log - I mean when the warning generated while accessing any page or post in backend or fronntend?

#624190

Based on how often it appears in the error.log I would presume it is also in the frontend. Cannot not be more precise than that I am afraid.

#624203

Minesh
Supporter

Languages: English (English )

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

Ok thanks.

In order to debug this issue further I need duplicator package of your site.

Could you please send me copy of your site. With the following link you will find more details how you can share duplicator package with us:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#625750

As it is a big site and I think I can replicate the issue on a more basic clean install. I would like to do that instead if that is ok with you?

I have definitely confirmed that is an issue when using PHP7.1 or above. Nothing in error.log on PHP 7.0

And I think it is related to a view with a date and time query

fieldname is a number between TODAY(), FUTURE_DAY()
AND
fieldname is a number greater than NOW()

#625815

To be more specific it is the fieldname is a number between TODAY(), FUTURE_DAY() that causes the error. So something in PHP 7.1 or greater that requires a change I think.

#626208

Minesh
Supporter

Languages: English (English )

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

Ok - I've PHP 7.2 installed on my localhost machine. I just wanted to know here - the field for which you are adding the filter is custom field or it's publish date?

#626212

It is custom types Date field. (Input date and time)

#626214

Minesh
Supporter

Languages: English (English )

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

What if you try to use the UNSIGNED option when you add the query filter.

Please check following image:
=> hidden link

Does this makes any difference?

#626884

Unsigned option does not make difference no

Is a number between today and future day gives the error but no error if query just set to equal to today

#626886

Minesh
Supporter

Languages: English (English )

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

Ok - as I remember you have clean install to test this issue - correct?

Could you please send me duplicator copy of your test site.

More info:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#627320

Minesh
Supporter

Languages: English (English )

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

Well - the warning was appearing because you didnt enter any value to future day filter.

Please check following screenshot:
=> hidden link

I've added the 1 as future day value to input box and I do not see any warnings now.

#627326

Oh I see. So I did not notice that missing before new PHP version notified it. Well thanks a lot for clearing that up Minesh.