Skip to content

Commit 86c5460

Browse files
author
Thies C. Arntzen
committed
@- Fixed crash in pathinfo()
1 parent 8fcc3a3 commit 86c5460

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ PHP_FUNCTION(pathinfo)
902902
int idx;
903903

904904
p = strrchr(Z_STRVAL_PP(path), '.');
905-
if (*p) {
905+
if (p) {
906906
idx = p - Z_STRVAL_PP(path);
907907
add_assoc_stringl(tmp, "extension", Z_STRVAL_PP(path) + idx + 1, len - idx - 1, 1);
908908
}

0 commit comments

Comments
 (0)