diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-12-06 11:39:15 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-12-06 11:39:15 +0100 |
commit | f9ff3afd28fbd5539a1081f25b83766369d78267 (patch) | |
tree | e67d80e721a4db80434c3dafb97d1868ae257743 /system/libraries | |
parent | 3cece7b27c965a9a6bc73d080f6df0a6ba681be0 (diff) | |
parent | dba657efda6e057dc0c741dc449937c8ba5a029a (diff) |
Merge pull request #647 from tomcode/patch-1
Zip class checks file exists to prevent error warnings in the log
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Zip.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 9101eecb4..52f1bc3d0 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -99,9 +99,9 @@ class CI_Zip { */ function _get_mod_time($dir) { - // filemtime() will return false, but it does raise an error. - $date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now); - + // filemtime() may return false, but raises an error for non-existing files + $date = (file_exists($dir)) ? filemtime($dir): getdate($this->now); + $time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2; $time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday']; |