diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-09 16:50:46 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-09 16:54:42 +0200 |
commit | fcc6da3e42750094b9bad92103f5704fb4af7989 (patch) | |
tree | ae1f34340e5fc00acb49e5a316c2d021f22ce2ce | |
parent | c10f30fdf9d7b7e03523e7266b2f0a5fc07595d9 (diff) | |
download | php-git-fcc6da3e42750094b9bad92103f5704fb4af7989.tar.gz |
Mark $time argument of touch() as UNKNOWN as well
For some reason I thought that passing 0 is same as current time,
but that's not the case.
-rwxr-xr-x | ext/standard/basic_functions.stub.php | 2 | ||||
-rwxr-xr-x | ext/standard/basic_functions_arginfo.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 067797111c..f63a5dbae6 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -942,7 +942,7 @@ function lchgrp(string $filename, $group): bool {} function chmod(string $filename, int $mode): bool {} #if HAVE_UTIME -function touch(string $filename, int $time = 0, int $atime = UNKNOWN): bool {} +function touch(string $filename, int $time = UNKNOWN, int $atime = UNKNOWN): bool {} #endif function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 8fb731f912..f5ff383d24 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1442,7 +1442,7 @@ ZEND_END_ARG_INFO() #if HAVE_UTIME ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_touch, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, atime, IS_LONG, 0) ZEND_END_ARG_INFO() #endif |