From 944e9b8c69c4b78f7afbc6153d35cd50da060b09 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Fri, 20 Sep 2013 12:40:21 +0200
Subject: [PATCH] make sure that both $permissions and $oldPermissions have the
 same type

---
 lib/public/share.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/public/share.php b/lib/public/share.php
index 91c5c477c8..91b0ef6dc6 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -463,7 +463,7 @@ class Share {
 				} else {
 					// reuse the already set password, but only if we change permissions
 					// otherwise the user disabled the password protection
-					if ($checkExists && (int)$permissions !== $oldPermissions) {
+					if ($checkExists && (int)$permissions !== (int)$oldPermissions) {
 						$shareWith = $checkExists['share_with'];
 					}
 				}
-- 
GitLab