diff --git a/app/main/lib/config.php b/app/main/lib/config.php index d1a7698a..1ce9ee9d 100644 --- a/app/main/lib/config.php +++ b/app/main/lib/config.php @@ -301,7 +301,7 @@ class Config extends \Prefab { 'PASS' => self::getEnvironmentData('DB_' . $alias . '_PASS') ]; - $pdoReg = '/^(?[[:alpha:]]+):((host=(?[a-zA-Z0-9\.]*))|(unix_socket=(?[a-zA-Z0-9\/]*\.sock)))((;dbname=(?\w*))|(;port=(?\d*))){0,2}/'; + $pdoReg = '/^(?[[:alpha:]]+):((host=(?[a-zA-Z0-9-_\.]*))|(unix_socket=(?[a-zA-Z0-9\/]*\.sock)))((;dbname=(?\w*))|(;port=(?\d*))){0,2}/'; if(preg_match($pdoReg, self::getEnvironmentData('DB_' . $alias . '_DNS'), $matches)){ // remove unnamed matches $matches = array_intersect_key($matches, $config);