Add tests to check mismatching function signatures

Closes GH-5666
This commit is contained in:
Máté Kocsis 2020-06-05 14:40:40 +02:00
parent 170d63ec62
commit aa9b0ccda8
No known key found for this signature in database
GPG key ID: FD055E41728BF310
7 changed files with 114 additions and 60 deletions

View file

@ -2540,14 +2540,14 @@ PHP_FUNCTION(is_uploaded_file)
char *path;
size_t path_len;
if (!SG(rfc1867_uploaded_files)) {
RETURN_FALSE;
}
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_PATH(path, path_len)
ZEND_PARSE_PARAMETERS_END();
if (!SG(rfc1867_uploaded_files)) {
RETURN_FALSE;
}
if (zend_hash_str_exists(SG(rfc1867_uploaded_files), path, path_len)) {
RETURN_TRUE;
} else {
@ -2568,15 +2568,15 @@ PHP_FUNCTION(move_uploaded_file)
int oldmask; int ret;
#endif
if (!SG(rfc1867_uploaded_files)) {
RETURN_FALSE;
}
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STRING(path, path_len)
Z_PARAM_PATH(new_path, new_path_len)
ZEND_PARSE_PARAMETERS_END();
if (!SG(rfc1867_uploaded_files)) {
RETURN_FALSE;
}
if (!zend_hash_str_exists(SG(rfc1867_uploaded_files), path, path_len)) {
RETURN_FALSE;
}