Skip to content

Commit 4a5cc39

Browse files
committedMar 25, 2021
fixed missing set default value on filemagic function
1 parent be27769 commit 4a5cc39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎magic.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,11 @@ ZEND_FUNCTION(filemagic) {
195195
switch (p) {
196196
case IS_STRING :
197197
mpath = Z_STRVAL_P (zflag);
198-
flag = 0;
198+
flag = MAGIC_NONE;
199199
break;
200200
case IS_LONG :
201201
flag = Z_LVAL_P (zflag);
202+
mpath = MAGIC;
202203
break;
203204
default :
204205
php_error (E_WARNING, "2th argument is only available for integer(flag) or MAGIC file path.");

0 commit comments

Comments
 (0)