update hasError() - fix#4563
fix for #4563
add regression test for #4563
Merge pull request #4573 from antograssiot/3.0

3.0 - fix#4563 error div on file input
Replace intval() with int typecasts
Correct typecast of math expression
Merge pull request #4584 from bcrowe/3.0-int-cast

3.0 - Replace intval() with int typecasts