Skip Navigation

[Resolved] Split: PHP error “Warning: A non-numeric value encountered…”

This thread is resolved. Here is a description of the problem and solution.

Problem:
The following error occurred after updating to PHP 7.2:

Warning: A non-numeric value encountered in /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/toolset.function.helpers.php

Solution:
This is generated when there is a View which uses date filters and where a value is expected when using settings such as PAST_DAY(3) but is missing, i.e. PAST_DAY().

This support ticket is created 6 years 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Jeffrey Veffer 6 years ago.

Assisted by: Nigel.

Author
Posts
#1186598

Hi Nigel-
I am getting this error on the main page of all the sub domains:
"Warning: A non-numeric value encountered in /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/toolset.function.helpers.php on line 196 "

Can you assist?

tx

#1186601

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Jeffrey

The only other reference I can find to something similar related to upgrading the PHP version a site was using to 7.2.x and it involved the use of a View with date filters, which is consistent with the file where the warning is generated.

Do your sites use date filters? Can you point me in the direction of one example that I could look at to see specifically how it is added?

#1186780

Hi Nigel
Is this page what you mean?
hidden link

#1186855

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, I don't seem to be able to log in any more.

Can I get updated credentials please.

#1186863
toolsetNigel2.jpg

Sorry Nigel, not sure what happened there, I didn't change anything for the Network admin panel
Maybe try again to hidden link
{Note, sometimes it will look like you are logining into the network admin but its really, app-wellclientapp which is hidden link}

Thanks!

#1188028

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-01-21 at 10.07.59.png

Hi Jeffrey

This looks similar to the one other occasion I have seen the same error reported.

Your View includes the Query Filter shown in the screenshot, where PAST_DAY() expects a value (as you have provided with FUTURE_DATE) but the value is missing.

From the other thread about a similar issue, it appears that it worked without supply a value (even if the value were zero) in earlier versions of PHP, but updating to 7.2.x produces the warning.

Can you edit your Views that include such a filter and be sure to include a value?

#1188172

Hi Nigel
Would including the same value (e.g. PAST_DAY(1) ) be a solution?

#1188198

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, that would mean from one day ago (yesterday). You should have a value, I believe the lack of a value is what is triggering the warnings.

#1188398

My issue is resolved now. Thank you!