diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-17 14:06:25 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-20 23:49:55 +0200 |
commit | 051dde08dbaa447c89e7a84d456045cc74240a19 (patch) | |
tree | f18271179b4020ce9f8aa329187b366f198e0bdd /lib/app.php | |
parent | 699a484f42b4c20bafa7f3ff22bd95b0e03fec9e (diff) | |
download | nextcloud-server-051dde08dbaa447c89e7a84d456045cc74240a19.tar.gz nextcloud-server-051dde08dbaa447c89e7a84d456045cc74240a19.zip |
Check for file exists before loading app version file
Diffstat (limited to 'lib/app.php')
-rwxr-xr-x | lib/app.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/app.php b/lib/app.php index 594f0577091..cb68ea3ddde 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'] : ''; |