Skip to content

Commit 1e3498e

Browse files
committed
ext/standard: Use zend_string in is_uploaded_file()
1 parent 1c129c7 commit 1e3498e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/standard/basic_functions.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,18 +2329,17 @@ PHP_FUNCTION(unregister_tick_function)
23292329
/* {{{ Check if file was created by rfc1867 upload */
23302330
PHP_FUNCTION(is_uploaded_file)
23312331
{
2332-
char *path;
2333-
size_t path_len;
2332+
zend_string *path;
23342333

23352334
ZEND_PARSE_PARAMETERS_START(1, 1)
2336-
Z_PARAM_PATH(path, path_len)
2335+
Z_PARAM_PATH_STR(path)
23372336
ZEND_PARSE_PARAMETERS_END();
23382337

23392338
if (!SG(rfc1867_uploaded_files)) {
23402339
RETURN_FALSE;
23412340
}
23422341

2343-
if (zend_hash_str_exists(SG(rfc1867_uploaded_files), path, path_len)) {
2342+
if (zend_hash_exists(SG(rfc1867_uploaded_files), path)) {
23442343
RETURN_TRUE;
23452344
} else {
23462345
RETURN_FALSE;

0 commit comments

Comments
 (0)