]> granicus.if.org Git - php/commitdiff
@- Fixed crash in pathinfo()
authorThies C. Arntzen <thies@php.net>
Fri, 13 Apr 2001 18:22:13 +0000 (18:22 +0000)
committerThies C. Arntzen <thies@php.net>
Fri, 13 Apr 2001 18:22:13 +0000 (18:22 +0000)
ext/standard/string.c

index 77172441f392b94f73bfd4d3552a1bda59d254c6..ee632b16369c2ec69c1f531b9778ad49fe3082f2 100644 (file)
@@ -902,7 +902,7 @@ PHP_FUNCTION(pathinfo)
                int idx;
 
                p = strrchr(Z_STRVAL_PP(path), '.');
-               if (*p) {
+               if (p) {
                        idx = p - Z_STRVAL_PP(path);
                        add_assoc_stringl(tmp, "extension", Z_STRVAL_PP(path) + idx + 1, len - idx - 1, 1);
                }