Hi

 

What happened with the Zend_Filter_Input functions?

 

I had this in my bootstrap file (index.php)

Zend::register('post', new Zend_Filter_Input($_POST), false);

Zend::register('get', new Zend_Filter_Input($_GET), false);

 

And then I used that to filter input made by the user like this.

$imaId = trim($post->noTags('imaId'));

 

This was really good because if the imaId in the form that was submitted
were an unchecked checkbox I didn't get an error.

 

But if I know use.

 

Zend_Loader::loadClass('Zend_Filter_Striptags');

$filterChain = new Zend_Filter();

$filterChain->addFilter(new Zend_Filter_Striptags());

$imaId= $filterChain->filter($_POST['imaId']);

 

I get a error notice out of this.Notice: undefined index imaId .and so on.

 

Anybody who can help how to do this without having to use.isset($_POST["."])
everywhere?

 

Regards

/Thomas

 

 

Reply via email to