[Pkg-owncloud-commits] [owncloud] 19/223: some additional type checks

David Prévot taffit at moszumanska.debian.org
Sun Jun 22 01:54:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit a110973b3a7d10c630e901e5ee7fb77b7a1e0f28
Author: Georg Ehrke <developer at georgehrke.com>
Date:   Fri Jun 6 09:41:33 2014 +0200

    some additional type checks
---
 lib/private/app.php       | 4 ++--
 lib/private/installer.php | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/private/app.php b/lib/private/app.php
index 0292abb..3c7b17c 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 c0fc530..1589610 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)) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list