Update database.php

This commit is contained in:
Joshua Ruehlig 2017-04-24 23:40:52 -07:00 committed by GitHub
parent ca1e8a13fe
commit 05a141bf78
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ function dbConnect()
if (strpos(ZM_DB_HOST, ':')) { if (strpos(ZM_DB_HOST, ':')) {
// Host variable may carry a port or socket. // Host variable may carry a port or socket.
list($host, $portOrSocket) = explode(':', ZM_DB_HOST, 2); list($host, $portOrSocket) = explode(':', ZM_DB_HOST, 2);
if (is_numeric($portOrSocket)) { if (ctype_digit($portOrSocket)) {
$socket = ':host='.$host . ';port='.$portOrSocket; $socket = ':host='.$host . ';port='.$portOrSocket;
} else { } else {
$socket = ':unix_socket='.$portOrSocket; $socket = ':unix_socket='.$portOrSocket;