summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-08-19 20:47:12 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-19 20:47:12 +0200
commit49096ffbef17eaabfae48e75b2a1993d616f3289 (patch)
tree287ed3ef459a75540b53c4beb21eb12455954525
parentd6d08a78344675340fe5cffbeaab16550b37eceb (diff)
fix warning if data/client/latest doen't exist
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/file.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 9458e9f53..f9892d5ca 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -16,7 +16,9 @@ class File extends CI_Controller {
$this->load->model('file_mod');
$this->var->cli_client = false;
$this->file_mod->var->cli_client =& $this->var->cli_client;
- $this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest'));
+ if (file_exists(FCPATH.'data/client/latest')) {
+ $this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest'));
+ }
// official client uses "fb-client/$version" as useragent
$clients = array("fb-client", "libcurl", "pyfb");