Zend Framework

Zend_Filter_Input::testEmail does not work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 0.1.5
  • Fix Version/s: None
  • Component/s: Zend_Filter
  • Labels:
    None

Description

<?php
$_POST['email'] = 'test@zend.com';

require_once 'Zend/Filter/Input.php';
$filterPost = new Zend_Filter_Input($_POST);

var_dump($filterPost->testEmail('email'));
?>

returns false. expected true in this case.

Issue Links

Activity

Hide
Uros added a comment -

I think you missed that

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

Show
Uros added a comment - I think you missed that $filterPost = new Zend_Filter_Input($_POST['email']);
Hide
Sebastian Nohn added a comment -

I don't think so.

$filterPost->getAlnum('email');

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

Show
Sebastian Nohn added a comment - I don't think so. $filterPost->getAlnum('email'); 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
Hide
Matt Schmidt added a comment -

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.

Show
Matt Schmidt added a comment - 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.
Hide
Bill Karwin added a comment -

Reassigning from Jayson to Bill Karwin, pending further triage.

Show
Bill Karwin added a comment - Reassigning from Jayson to Bill Karwin, pending further triage.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: