From e7dc6b21c8994a7ade7d88ab4e27957e8a4ec9c9 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Thu, 17 Oct 2013 15:47:36 +0200
Subject: [PATCH] split up reset()['path'] to make it compatible with older PHP
 versions

---
 apps/files_sharing/lib/api.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index 15bd7be914..d92d30156c 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -132,7 +132,8 @@ class Api {
 		// if there are no shares than there are also no reshares
 		if (count($shares) > 0) {
 			$ids = array();
-			$path = reset($shares)['path'];
+			$firstShare = reset($shares);
+			$path = $firstShare['path'];
 			foreach ($shares as $share) {
 				$ids[] = $share['id'];
 			}
-- 
GitLab