Bug #76379 [NEW]: cant touch with $atime=null
| From: | remco at priya dot software | Date: | Fri, 25 May 2018 20:50:13 +0000 |
| Subject: | Bug #76379 [NEW]: cant touch with $atime=null | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-215372@lists.php.net to get a copy of this message | ||
From: remco at priya dot software
Operating system: PHP 7.2.5-1+ubuntu14.04.1+deb.su
PHP version: 7.2.6
Package: URL related
Bug Type: Bug
Bug description:cant touch with $atime=null
Description:
------------
see the test script
( ! ) Warning: touch(): Utime failed: Operation not permitted in
/mnt/c/Library/Server/Vendor/Priya/Module/File/Class/File.class.php on
line 40
Test script:
---------------
//works
public static function touch($url='', $time=null, $atime=null){
if($atime === null){
return touch($url, $time);
} else {
return touch($url, $time, $atime);
}
}
// doesnt work:
public static function touch($url='', $time=null, $atime=null){
return touch($url, $time, $atime);
}
//$url =
'/mnt/c/Library/Server/Vendor/Priya/Application/Data/Cache/01/1578ee0fedd628ca8227e04bfc7b1e3917fb1833.json'
(length=106)
//$time = 1527281173
//$atime = null
( ! ) Warning: touch(): Utime failed: Operation not permitted in
/mnt/c/Library/Server/Vendor/Priya/Module/File/Class/File.class.php on
line 40
Expected result:
----------------
no warning with the "fix"...
no warning with the "doesn't work"
--
Edit bug report at https://bugs.php.net/bug.php?id=76379&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76379&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76379&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76379&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76379&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76379&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76379&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76379&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76379&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76379&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76379&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76379&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76379&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76379&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76379&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76379&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76379&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76379&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76379&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76379&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76379&r=mysqlcfg