[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.
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 "
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?
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}
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?