From 43652d386a753c0a280790525e3593ecb416793c Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 22 Jan 2015 10:16:13 +0100 Subject: simplify error handling for dirs as magic --- ext/fileinfo/libmagic/apprentice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/fileinfo/libmagic/apprentice.c') diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index 1cbe0fce5e..964d756e9d 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -2616,7 +2616,7 @@ apprentice_map(struct magic_set *ms, const char *fn) return to give apprentice_load() a chance. */ if (php_stream_stat_path_ex((char *)fn, 0, &st, NULL) == SUCCESS) { if (st.sb.st_mode & S_IFDIR) { - goto error; + return NULL; } } #endif -- cgit v1.2.1