diff --git a/lib/public/share.php b/lib/public/share.php
index 2b7bf59219fa21f9c7b2f7af24a435c31f4f8c37..8508eb96e5e7121b100649c3208a141cf7a16886 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -207,8 +207,7 @@ class Share {
 			
 			// let's get the parent for the next round
 			$meta = $cache->get((int)$source);
-			$parent = $meta['parent'];
-			$source = $parent;
+			$source = $meta['parent'];
 		}
 		// Include owner in list of users, if requested
 		if ($includeOwner) {