From 9ff926a2dcefcdc4bd26ee8b5bc756013b7f5fc3 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sat, 16 Jul 2005 02:39:44 +0000 Subject: [PATCH] Instead of calling two functions before unlinking, just use @unlink(). --- etc/inc/util.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 58f13b35bf..c41d8245c6 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -288,9 +288,9 @@ function unlink_if_exists($fn) { $to_do = glob($fn); if(is_array($to_do)) { foreach($to_do as $filename) - if (file_exists($filename) && !is_dir($filename)) unlink($filename); + @unlink($filename); } else { - if (file_exists($fn)) unlink($fn); + @unlink($fn); } }