From bce8c8fb272c6f0a84a1aa87d6dd0e7d6e28b6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 6 May 2020 09:26:48 +0200 Subject: Promote warning to exception in ZipArchive::extractTo() Closes GH-5516 --- ext/zip/php_zip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index dc60312285..c68bb3ccb2 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2810,10 +2810,9 @@ static ZIPARCHIVE_METHOD(extractTo) } } break; - case IS_LONG: default: - php_error_docref(NULL, E_WARNING, "Invalid argument, expect string or array of strings"); - break; + zend_argument_type_error(2, "must be of type array|string|null, %s given", zend_zval_type_name(zval_files)); + RETURN_THROWS(); } } else { /* Extract all files */ -- cgit v1.2.1