From 4a09d9ec22fdcc75dcc60b2438fbb820b707e375 Mon Sep 17 00:00:00 2001 From: Pepijn Over Date: Mon, 23 Jun 2014 11:54:22 +0200 Subject: [PATCH] adding if is_resource check around fclose to prevent warnings --- src/psm/Util/Updater/StatusUpdater.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/psm/Util/Updater/StatusUpdater.class.php b/src/psm/Util/Updater/StatusUpdater.class.php index dacd784a..62063505 100644 --- a/src/psm/Util/Updater/StatusUpdater.class.php +++ b/src/psm/Util/Updater/StatusUpdater.class.php @@ -149,7 +149,9 @@ class StatusUpdater { $status = ($fp === false) ? false : true; $this->rtime = (microtime(true) - $starttime); - fclose($fp); + if(is_resource) { + fclose($fp); + } // check if server is available and rerun if asked. if(!$status && $run < $max_runs) {