Skip Navigation

[Resolved] Calculate Custom Plugin – Parse Error with Empty Fields

This support ticket is created 5 years, 3 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.

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

This topic contains 2 replies, has 1 voice.

Last updated by Kenneth Horn 5 years, 3 months ago.

Author
Posts
#1307305

I'm using mathematical calculations native to PHP using the plugin code described in this post: https://toolset.com/forums/topic/math-with-custom-fields-values/
Works as expected except that when a number-field is empty that is used in a calculation in the plugin a parse error occurs which prohibits displaying the page front end and prohibits opening it in Admin.
I am not a PHP coder. Is there a simple way the PHP code can be modifed so as not to create the parse error with an empty field?

#1307309

xxx

#1307323

My issue is resolved now. Thank you!