Ech, I hate myself for this, but it isnt that bad, only 7 days xD
DJK, I want to question your methods. :)
if (!filter_var($item, FILTER_VALIDATE_INT)) {
$error = 'Invalid item passed through function.';
} else {
$item = abs (filter_var ($item, FILTER_SANITIZE_NUMBER_INT));
Your validating that $item is a number, (for others its in the if statement). Then your sanitizing, meaning it will only allow numbers, even though you've already made sure its a number, surely you only need one. :S