diff --git a/lib/private/app.php b/lib/private/app.php
index 0292abb631097ac22ecc420f8118e0becd55362c..3c7b17c148b43101c478d317542cb0611028d55b 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -521,7 +521,7 @@ class OC_App {
 	 */
 	public static function isAppDirWritable($appid) {
 		$path = self::getAppPath($appid);
-		return is_writable($path);
+		return ($path !== false) ? is_writable($path) : false;
 	}
 
 	/**
@@ -544,7 +544,7 @@ class OC_App {
 	 */
 	public static function getAppVersion($appid) {
 		$file = self::getAppPath($appid);
-		return self::getAppVersionByPath($file);
+		return ($file !== false) ? self::getAppVersionByPath($file) : '0';
 	}
 
 	/**
diff --git a/lib/private/installer.php b/lib/private/installer.php
index c0fc5304d4a97699145b30e80144918d746dd797..1589610aed42801d4081e56f48ac5678dad3cdf6 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -173,7 +173,7 @@ class OC_Installer{
 		$basedir .= '/';
 		$basedir .= $info['id'];
 
-		if($currentDir !== null && is_writable($currentDir)) {
+		if($currentDir !== false && is_writable($currentDir)) {
 			$basedir = $currentDir;
 		}
 		if(is_dir($basedir)) {