diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-08-19 20:47:12 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-08-19 20:47:12 +0200 |
commit | 49096ffbef17eaabfae48e75b2a1993d616f3289 (patch) | |
tree | 287ed3ef459a75540b53c4beb21eb12455954525 /application/controllers | |
parent | d6d08a78344675340fe5cffbeaab16550b37eceb (diff) |
fix warning if data/client/latest doen't exist
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/file.php | 4 |
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"); |