From 49096ffbef17eaabfae48e75b2a1993d616f3289 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 19 Aug 2011 20:47:12 +0200 Subject: fix warning if data/client/latest doen't exist Signed-off-by: Florian Pritz --- application/controllers/file.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application') 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"); -- cgit v1.2.3-24-g4f1b