Skip to content

Commit 3dec2a2

Browse files
committed
Promote warning to exception in ZipArchive::extractTo()
1 parent d55b4f5 commit 3dec2a2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,10 +2809,9 @@ static ZIPARCHIVE_METHOD(extractTo)
28092809
}
28102810
}
28112811
break;
2812-
case IS_LONG:
28132812
default:
2814-
php_error_docref(NULL, E_WARNING, "Invalid argument, expect string or array of strings");
2815-
break;
2813+
zend_argument_type_error(2, "must be of type array|string, %s given", zend_zval_type_name(zval_files));
2814+
RETURN_THROWS();
28162815
}
28172816
} else {
28182817
/* Extract all files */

0 commit comments

Comments
 (0)