Update database.php
This commit is contained in:
parent
ca1e8a13fe
commit
05a141bf78
|
@ -33,7 +33,7 @@ function dbConnect()
|
|||
if (strpos(ZM_DB_HOST, ':')) {
|
||||
// Host variable may carry a port or socket.
|
||||
list($host, $portOrSocket) = explode(':', ZM_DB_HOST, 2);
|
||||
if (is_numeric($portOrSocket)) {
|
||||
if (ctype_digit($portOrSocket)) {
|
||||
$socket = ':host='.$host . ';port='.$portOrSocket;
|
||||
} else {
|
||||
$socket = ':unix_socket='.$portOrSocket;
|
||||
|
|
Loading…
Reference in New Issue