diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 7b14a4ec0816ddae30f00be3bdb4c5c0101c8239..9b931333b7f729542c2c87bd539ea45a410d6588 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -824,13 +824,15 @@ class Trashbin {
 			$matches = glob($escapedVersionsName . '*');
 		}
 
-		foreach ($matches as $ma) {
-			if ($timestamp) {
-				$parts = explode('.v', substr($ma, 0, $offset));
-				$versions[] = (end($parts));
-			} else {
-				$parts = explode('.v', $ma);
-				$versions[] = (end($parts));
+		if (is_array($matches)) {
+			foreach ($matches as $ma) {
+				if ($timestamp) {
+					$parts = explode('.v', substr($ma, 0, $offset));
+					$versions[] = (end($parts));
+				} else {
+					$parts = explode('.v', $ma);
+					$versions[] = (end($parts));
+				}
 			}
 		}
 		return $versions;
@@ -921,13 +923,11 @@ class Trashbin {
 	public static function isEmpty($user) {
 
 		$view = new \OC\Files\View('/' . $user . '/files_trashbin');
-		$dh = $view->opendir('/files');
-		if (!$dh) {
-			return false;
-		}
-		while ($file = readdir($dh)) {
-			if ($file !== '.' and $file !== '..') {
-				return false;
+		if ($view->is_dir('/files') && $dh = $view->opendir('/files')) {
+			while ($file = readdir($dh)) {
+				if ($file !== '.' and $file !== '..') {
+					return false;
+				}
 			}
 		}
 		return true;
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 0a111225a70e7b90cdbf469470a62f0a6b8aea8d..03f2b8db090ae98d7e6d81a72c74b03be98b44ff 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -37,7 +37,7 @@
 				<p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes'));?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes'));?>"></textarea></p>
 				<p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'member')) p(' selected'); ?>>member (AD)</option></select></p>
 				<p><label for="ldap_nested_groups"><?php p($l->t('Nested Groups'));?></label><input type="checkbox" id="ldap_nested_groups" name="ldap_nested_groups" value="1" data-default="<?php p($_['ldap_nested_groups_default']); ?>"  title="<?php p($l->t('When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)'));?>" /></p>
-				<p><label for="ldap_paging_size"><?php p($l->t('Paging chunksize'));?></label><input type="number" id="ldap_paging_size" name="ldap_paging_size" title="<?php p($l->t('Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)'));?>" data-default="<?php p($_['ldap_paging_size']); ?>" /></p>
+				<p><label for="ldap_paging_size"><?php p($l->t('Paging chunksize'));?></label><input type="number" id="ldap_paging_size" name="ldap_paging_size" title="<?php p($l->t('Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)'));?>" data-default="<?php p($_['ldap_paging_size_default']); ?>" /></p>
 			</div>
 			<h3><?php p($l->t('Special Attributes'));?></h3>
 			<div>
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 571bf7f97c1af3deead5280dc167abd66c4a039f..ff2949d33b6b98e9bac977a688ebdef5b05b6e83 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -305,7 +305,11 @@ if (\OC_Util::runningOnWindows()) {
 		 * @return bool
 		 */
 		public function hasUpdated($path, $time) {
-			return $this->filemtime($path) > $time;
+			if ($this->file_exists($path)) {
+				return $this->filemtime($path) > $time;
+			} else {
+				return true;
+			}
 		}
 
 		/**