From da9f9ae9b3b77b34c6b54ab789f1efe94a3e2781 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 12 Sep 2014 19:51:47 +0200 Subject: [PATCH] Remove passing by reference to allow for proper GC The garbage collector in PHP 5.3.10 does not properly release the file handle when calling fclose() due to the fact that it is passed by reference. This has the side-effect of preventing file locks to be released as well when the files_locking app is enabled. This fix removes the useless passing by reference and now the file handle and file lock are freed properly. --- apps/files_encryption/lib/proxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index c814e6cb55b..31d11338ef5 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -247,7 +247,7 @@ class Proxy extends \OC_FileProxy { * @param resource $result * @return resource */ - public function postFopen($path, &$result) { + public function postFopen($path, $result) { $path = \OC\Files\Filesystem::normalizePath($path); -- 2.39.5