diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-05-06 09:26:48 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-05-06 19:22:52 +0200 |
commit | bce8c8fb272c6f0a84a1aa87d6dd0e7d6e28b6b3 (patch) | |
tree | 4ded635fc8d744d9776d6fa6f19ebbb519602fb1 /ext/zip/php_zip.c | |
parent | 650da66e2dbd5e20f956c225b4a5d423fb18ccbe (diff) | |
download | php-git-bce8c8fb272c6f0a84a1aa87d6dd0e7d6e28b6b3.tar.gz |
Promote warning to exception in ZipArchive::extractTo()
Closes GH-5516
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 5 |
1 files changed, 2 insertions, 3 deletions
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 */ |