From 311d876f0b97ba6f666b23d0fbe0bfce0973e792 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 2 Aug 2013 10:25:14 +0200 Subject: Hide PHP warning when calling filemtime() on not-existent file --- program/lib/Roundcube/rcube.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index ce97cd0a5..e0f889a87 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -498,11 +498,11 @@ class rcube if ($tmp && ($dir = opendir($tmp))) { while (($fname = readdir($dir)) !== false) { - if ($fname{0} == '.') { + if ($fname[0] == '.') { continue; } - if (filemtime($tmp.'/'.$fname) < $expire) { + if (@filemtime($tmp.'/'.$fname) < $expire) { @unlink($tmp.'/'.$fname); } } -- cgit v1.2.3