Topic: Bug in includes\ui\ui_input.inc
Hi,
With debugging on I notice a lot of these messages occuring through out the application, for example:
A non-numeric value encountered in file: C:\Users\Paul\htdocs\fa24\includes\ui\ui_input.inc at line 350
C:\Users\Paul\htdocs\fa24\sales\manage\customers.php:330: check_value('show_inactive')
Problem is in function check_vaule
function check_value($name)
{
if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)
return 0;
return 1;
}
And is related to GIT dc449868579dadd4fb918b6a9a7b10ba175d388b
- if (!isset($_POST[$name]) || $_POST[$name]=='')
+ if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)
There seems to be three values passed to this function: NULL, '', '1'. The error is occurring when the check box is not ticked (ie: '')
I propose this as a possible solution:
function check_value($name)
{
if (!isset($_POST[$name]))
return 0;
if ($_POST[$name] === 0)
return 0;
return 1;
}
Hope this helps.