mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/standard: Use zend_string in is_uploaded_file()
This commit is contained in:
parent
1c129c723d
commit
1e3498ea01
1 changed files with 3 additions and 4 deletions
|
@ -2329,18 +2329,17 @@ PHP_FUNCTION(unregister_tick_function)
|
|||
/* {{{ Check if file was created by rfc1867 upload */
|
||||
PHP_FUNCTION(is_uploaded_file)
|
||||
{
|
||||
char *path;
|
||||
size_t path_len;
|
||||
zend_string *path;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_PATH(path, path_len)
|
||||
Z_PARAM_PATH_STR(path)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (!SG(rfc1867_uploaded_files)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_str_exists(SG(rfc1867_uploaded_files), path, path_len)) {
|
||||
if (zend_hash_exists(SG(rfc1867_uploaded_files), path)) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue