From: Jan Schneider Date: Mon, 10 May 2010 20:55:29 +0000 (+0200) Subject: This is wrong, fix check and error message. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b58f580bcec9ba1741a40ea187eb11d85d81d2f6;p=horde.git This is wrong, fix check and error message. --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php b/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php index 8121c3504..2724f0b30 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php +++ b/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php @@ -96,8 +96,8 @@ class Horde_Db_Adapter_Pdo_Mysql extends Horde_Db_Adapter_Pdo_Base throw new Horde_Db_Exception($msg); } - if (preg_match('/[^\d\.]/', $dsnOpts['host'])) { - $msg = 'pdo_mysql ignores port unless IP address is used for host'; + if ($dsnOpts['host'] == 'localhost') { + $msg = 'pdo_mysql ignores port if using "localhost" for host'; throw new Horde_Db_Exception($msg); } }