CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 163 forks source link

Calculation value may be passed to is_infinite as string #2908

Open Shelob9 opened 5 years ago

Shelob9 commented 5 years ago

@swapnilmanjrekar reported this here: https://github.com/CalderaWP/Caldera-Forms/pull/2902#issuecomment-454175424

"PHP Warning: is_infinite() expects parameter 1 to be float, string given in /app/wp-content/plugins/1.8.0-alpha.1/classes/core.php on line 1450"

Problem is here: https://github.com/CalderaWP/Caldera-Forms/blob/d0b3377b803edcd4249168ce6a45dc7ea18dbe39/classes/core.php#L1450

Solution is to reverse order of checks and cast to float or int before checking?

Shelob9 commented 5 years ago

See my comment here: https://github.com/CalderaWP/Caldera-Forms/pull/2902#issuecomment-455670073 I am moving this to 1.8.1