1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[ticket/10226] Use is_numeric() instead of preg_replace()

PHPBB3-10226
This commit is contained in:
rxu 2011-06-21 22:03:19 +08:00
parent 578f9dffa6
commit 18fb3d86cd

View File

@ -48,7 +48,7 @@ class dbal_mysqli extends dbal
$socket = NULL;
if ($port)
{
if (preg_match('#^[0-9]+$#', $port))
if (is_numeric($port))
{
$port = (int) $port;
}