This is wrong, fix check and error message.
authorJan Schneider <jan@horde.org>
Mon, 10 May 2010 20:55:29 +0000 (22:55 +0200)
committerJan Schneider <jan@horde.org>
Mon, 10 May 2010 20:55:44 +0000 (22:55 +0200)
framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php

index 8121c35..2724f0b 100644 (file)
@@ -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);
             }
         }