From 2747a83a49ac803cc127614a6e0b40a244831bdf Mon Sep 17 00:00:00 2001
From: Joas Schilling <nickvergessen@owncloud.com>
Date: Mon, 9 Mar 2015 19:27:02 +0100
Subject: [PATCH] Get the id before using it

---
 lib/private/files/cache/cache.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index d39b59b23e..f377e9777d 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -259,8 +259,9 @@ class Cache {
 			}
 
 			// The file was created in the mean time
+			$id = $this->getId($file);
 			$this->update($id, $data);
-			return $this->getId($file);
+			return $id;
 		}
 	}
 
-- 
GitLab