Check correction (Thanks Andi).

This commit is contained in:
Ilia Alshanetsky 2003-12-19 13:49:59 +00:00
parent fbfde0fc0e
commit c6b04cb48a

View File

@ -1189,7 +1189,7 @@ PHP_FUNCTION(ip2long)
convert_to_string_ex(str);
if (Z_STRVAL_PP(str) == "" || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) {
if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) {
RETURN_LONG(-1);
}