I'm retrieving a value from JInput that must be a integer.
$input = new JInput();
$post = $input->getArray($_POST);
$value= $input->$post['value'];
Now obviously I can't use is_int() because $_POST makes the value a string - usually solved with filter_input(). That leaves me in a slight issue - as I want to reject anything that isn't a integer - not convert it into an integer. Using something along the lines of
$value=JFactory::getApplication()->input->get('value', '0', 'INT');
forces the string to be a integer. (e.g. inputting 1.2 will then give a $value of 1 etc.). So I'm stuck as to how to achieve this filter. Ideally I'd like to do something along the lines of
if(is_int($delete)) {
//Carry on processing data
} else {
//Stop function and display a JError
JLog::add("Value is not a integer", JLog::WARNING, 'jerror');
}