mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Add tests to check mismatching function signatures
Closes GH-5666
This commit is contained in:
parent
170d63ec62
commit
aa9b0ccda8
7 changed files with 114 additions and 60 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue