]> source.dussan.org Git - nextcloud-server.git/commitdiff
Get the id before using it
authorJoas Schilling <nickvergessen@owncloud.com>
Mon, 9 Mar 2015 18:27:02 +0000 (19:27 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 9 Mar 2015 21:37:49 +0000 (22:37 +0100)
lib/private/files/cache/cache.php

index d39b59b23e4a2fea525bed613c7b49dded5a9378..f377e9777d68bd4b98a2932970cbdc102c01a1be 100644 (file)
@@ -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;
                }
        }