From: Nikita Popov Date: Thu, 9 Apr 2020 14:50:46 +0000 (+0200) Subject: Mark $time argument of touch() as UNKNOWN as well X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fcc6da3e42750094b9bad92103f5704fb4af7989;p=php 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. --- 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