From 587afae52831d071a26cff41edc8c5a9d132fe2c Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 17 Sep 2006 17:30:09 +0200 Subject: infoutils update minor modifications to avoid php warnings if msg file is missing. darcs-hash:20060917153009-9b6ab-4b6ee49d728e89c3427130c617b532cd23c680bb.gz --- inc/infoutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/infoutils.php') diff --git a/inc/infoutils.php b/inc/infoutils.php index c619da2ac..98bd22352 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -25,8 +25,8 @@ function checkUpdateMessages(){ // check if new messages needs to be fetched if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_CONF.'msg')){ - $num = file(DOKU_CONF.'msg'); - $num = (int) $num[0]; + $num = @file(DOKU_CONF.'msg'); + $num = is_array($num) ? (int) $num[0] : 0; $http = new DokuHTTPClient(); $http->timeout = 8; $data = $http->get(DOKU_MESSAGEURL.$num); -- cgit v1.2.3