Check for file exists before loading app version file
This commit is contained in:
parent
04824162d9
commit
44287d680b
1 changed files with 2 additions and 3 deletions
|
@ -390,9 +390,8 @@ class OC_App{
|
||||||
*/
|
*/
|
||||||
public static function getAppVersion($appid) {
|
public static function getAppVersion($appid) {
|
||||||
$file= self::getAppPath($appid).'/appinfo/version';
|
$file= self::getAppPath($appid).'/appinfo/version';
|
||||||
$version=@file_get_contents($file);
|
if(is_file($file) && $version = trim(file_get_contents($file))) {
|
||||||
if($version) {
|
return $version;
|
||||||
return trim($version);
|
|
||||||
}else{
|
}else{
|
||||||
$appData=self::getAppInfo($appid);
|
$appData=self::getAppInfo($appid);
|
||||||
return isset($appData['version'])? $appData['version'] : '';
|
return isset($appData['version'])? $appData['version'] : '';
|
||||||
|
|
Loading…
Reference in a new issue