From: Rasmus Lerdorf Date: Mon, 13 May 2002 18:12:25 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.2.3RC1~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f9cf6eb18a4291ed53a8338c431aec91b80d950;p=php MFH --- diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index a330877a6d..52799a2424 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -478,17 +478,17 @@ PHP_FUNCTION(touch) struct utimbuf *newtime = NULL; int ac = ZEND_NUM_ARGS(); + newtime = &newtimebuf; + if (ac == 1 && zend_get_parameters_ex(1, &filename) != FAILURE) { #ifndef HAVE_UTIME_NULL newtime->modtime = newtime->actime = time(NULL); #endif } else if (ac == 2 && zend_get_parameters_ex(2, &filename, &filetime) != FAILURE) { - newtime = &newtimebuf; convert_to_long_ex(filetime); newtime->actime = time(NULL); newtime->modtime = newtime->actime = Z_LVAL_PP(filetime); } else if (ac == 3 && zend_get_parameters_ex(3, &filename, &filetime, &fileatime) != FAILURE) { - newtime = &newtimebuf; convert_to_long_ex(fileatime); convert_to_long_ex(filetime); newtime->actime = Z_LVAL_PP(fileatime);