From 44287d680bd0e8799724a7595db43c0fafcaff40 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Wed, 17 Oct 2012 14:06:25 +0200 Subject: [PATCH] Check for file exists before loading app version file --- lib/app.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/app.php b/lib/app.php index 594f057709..cb68ea3ddd 100755 --- a/lib/app.php +++ b/lib/app.php @@ -390,9 +390,8 @@ class OC_App{ */ public static function getAppVersion($appid) { $file= self::getAppPath($appid).'/appinfo/version'; - $version=@file_get_contents($file); - if($version) { - return trim($version); + if(is_file($file) && $version = trim(file_get_contents($file))) { + return $version; }else{ $appData=self::getAppInfo($appid); return isset($appData['version'])? $appData['version'] : '';