Created
June 12, 2013 07:50
-
-
Save fetus-hina/5763520 to your computer and use it in GitHub Desktop.
Zend_Validate_Hostname::decodePunycode() が "-" を含まない Punycode をデコードできない問題
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Zend/Validate/Hostname.php.b 2013-06-12 16:36:25.000000000 +0900 | |
+++ Zend/Validate/Hostname.php 2013-06-12 16:48:06.000000000 +0900 | |
@@ -705,15 +705,13 @@ | |
return false; | |
} | |
+ $decoded = array(); | |
$separator = strrpos($encoded, '-'); | |
if ($separator > 0) { | |
for ($x = 0; $x < $separator; ++$x) { | |
// prepare decoding matrix | |
$decoded[] = ord($encoded[$x]); | |
} | |
- } else { | |
- $this->_error(self::CANNOT_DECODE_PUNYCODE); | |
- return false; | |
} | |
$lengthd = count($decoded); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment