Skip to content

Commit

Permalink
[mms[ Make Net_IDNA2 the highest priority backend driver.
Browse files Browse the repository at this point in the history
True/Punycode does not handle multiple i18n domains in a single hostname
  • Loading branch information
slusarz committed Feb 26, 2015
1 parent a256891 commit c75527c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions framework/Idna/lib/Horde/Idna.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ public static function decode($data)
protected static function _getBackend()
{
if (!isset(self::$_backend)) {
if (extension_loaded('mbstring')) {
if (class_exists('Net_IDNA2')) {
self::$_backend = new Net_IDNA2();
} elseif (extension_loaded('mbstring')) {
if (file_exists(__DIR__ . '/Idna/vendor/autoload.php')) {
require_once __DIR__ . '/Idna/vendor/autoload.php';
} else {
require_once __DIR__ . '/../../bundle/vendor/autoload.php';
}
self::$_backend = new True\Punycode();
mb_internal_encoding('UTF-8');
} elseif (class_exists('Net_IDNA2')) {
self::$_backend = new Net_IDNA2();
} elseif (class_exists('Net_IDNA')) {
self::$_backend = new Net_IDNA();
} else {
Expand Down
4 changes: 2 additions & 2 deletions framework/Idna/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [mms[ Make Net_IDNA2 the highest priority backend driver.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -168,7 +168,7 @@
<date>2015-01-07</date>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [mms[ Make Net_IDNA2 the highest priority backend driver.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit c75527c

Please sign in to comment.