Browse Source

ZF-11451: Reverted patch applied in r24124

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24305 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 14 years ago
parent
commit
6305b50e78
2 changed files with 1 additions and 13 deletions
  1. 1 2
      library/Zend/Validate/EmailAddress.php
  2. 0 11
      tests/Zend/Validate/EmailAddressTest.php

+ 1 - 2
library/Zend/Validate/EmailAddress.php

@@ -527,9 +527,8 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract
         $this->_setValue($value);
 
         // Split email address up and disallow '..'
-        // and disallow addresses ending with a '.'
         if ((strpos($value, '..') !== false) or
-            (!preg_match('/^(.+)@([^@]+[^.])$/', $value, $matches))) {
+            (!preg_match('/^(.+)@([^@]+)$/', $value, $matches))) {
             $this->_error(self::INVALID_FORMAT);
             return false;
         }

+ 0 - 11
tests/Zend/Validate/EmailAddressTest.php

@@ -554,17 +554,6 @@ class Zend_Validate_EmailAddressTest extends PHPUnit_Framework_TestCase
     {
         $this->assertTrue($this->_validator->getDomainCheck());
     }
-    
-    /**
-     * @group ZF-11222
-     * @group ZF-11451
-     */
-    public function testEmailAddressesWithTrailingDotInHostPartAreRejected()
-    {
-        $this->assertFalse($this->_validator->isValid('example@gmail.com.'));
-        $this->assertFalse($this->_validator->isValid('test@test.co.'));
-        $this->assertFalse($this->_validator->isValid('test@test.co.za.'));
-    }
 
     public function errorHandler($errno, $errstr)
     {