[CLOSED] Filter sanitize

Hi! From last update my Controller's filtering starts working wrong:

// somewhere in controller
$news_id = $this->filter->sanitize($news_id, "int");

returns 'string', not 'integer'



41.4k

Sanitize is removing any non digits from string. By default, in PHP, all user input data is cast as string. You can force to a specific type: (int)$news_is. See. http://us3.php.net/manual/en/language.types.type-juggling.php

// returns "100019"
$filter->sanitize("!100a019", "int");

Sorry, I'm jumped from ZendFramework. Expected by me full filtering to integer value. Post closed.