]> granicus.if.org Git - php/commitdiff
MFH: Check correction
authorIlia Alshanetsky <iliaa@php.net>
Fri, 19 Dec 2003 13:50:01 +0000 (13:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 19 Dec 2003 13:50:01 +0000 (13:50 +0000)
ext/standard/basic_functions.c

index be57962684bb8fc9b16a18893b53e648e5634b0a..f22ae272ddc5782910da45d3a65eb6fa8637cfd9 100644 (file)
@@ -1237,7 +1237,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);
        }