diff options
author | chris <chris@jalakai.co.uk> | 2006-09-17 17:30:09 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-09-17 17:30:09 +0200 |
commit | 587afae52831d071a26cff41edc8c5a9d132fe2c (patch) | |
tree | bc1525d6d8ed90ace20779a5f4f2c2d4f080c850 /inc/infoutils.php | |
parent | 3d7760aa04b1d78e515c25d92e8849be398747ac (diff) | |
download | rpg-587afae52831d071a26cff41edc8c5a9d132fe2c.tar.gz rpg-587afae52831d071a26cff41edc8c5a9d132fe2c.tar.bz2 |
infoutils update
minor modifications to avoid php warnings if msg file is missing.
darcs-hash:20060917153009-9b6ab-4b6ee49d728e89c3427130c617b532cd23c680bb.gz
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r-- | inc/infoutils.php | 4 |
1 files changed, 2 insertions, 2 deletions
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); |