summaryrefslogtreecommitdiffstats
path: root/system/libraries/Zip.php
diff options
context:
space:
mode:
authorGreg Aker <greg@gregaker.net>2011-12-25 08:44:33 +0100
committerGreg Aker <greg@gregaker.net>2011-12-25 08:44:33 +0100
commitef38f0a6d83025fbd99ace5ec60311acfe9121c4 (patch)
tree1728bc5df9412d8eccc2919bf3cd3f6bbe6a52d0 /system/libraries/Zip.php
parentd90e1a0fb541ee94459a20cf8b0726aebaec9692 (diff)
parenta96ade374f28cdae97036fc253fd8b2a0e8dc81a (diff)
Merge branch 'develop' into feature/unit-tests
Diffstat (limited to 'system/libraries/Zip.php')
-rw-r--r--system/libraries/Zip.php6
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'];