]> granicus.if.org Git - php/commitdiff
Make touch() $atime parameter UNKNOWN
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 9 Apr 2020 14:06:37 +0000 (16:06 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 9 Apr 2020 14:11:17 +0000 (16:11 +0200)
The actual default here is $time, not 0.

ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h

index 40b424040f1edab29243ca39783bd4f4cbe21922..3554b77feee248a6b8d3fe6e5ba3ac3199d39f59 100755 (executable)
@@ -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 = 0): bool {}
+function touch(string $filename, int $time = 0, int $atime = UNKNOWN): bool {}
 #endif
 
 function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {}
index aca009456ee2059a70162287c95a4bc826012d3e..121380b7114b7c35739e69099bc4f5dd036a45eb 100755 (executable)
@@ -1443,7 +1443,7 @@ ZEND_END_ARG_INFO()
 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_WITH_DEFAULT_VALUE(0, atime, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO(0, atime, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 #endif