ZF-318: Zend_Filter_Input::testEmail does not work


<?php $_POST['email'] = ''; require_once 'Zend/Filter/Input.php'; $filterPost = new Zend_Filter_Input($_POST); var_dump($filterPost->testEmail('email')); ?>

returns false. expected true in this case.


I think you missed that

$filterPost = new Zend_Filter_Input($_POST['email']);

I don't think so.


works as expected. Why should I do $filterPost = new Zend_Filter_Input($_POST['email']);? I want to filter $_POST not an element of Post.

By the way, it's documented like I did ;)

Zend_Filter_Input::testEmail relies on Zend_Filter::isEmail, which unfortunately, does not have any code in it.

More info: [ZF-42] Probably even more on the mailing list.

Reassigning from Jayson to Bill Karwin, pending further triage.