]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove passing by reference to allow for proper GC
authorVincent Petry <pvince81@owncloud.com>
Fri, 12 Sep 2014 17:51:47 +0000 (19:51 +0200)
committerVincent Petry <pvince81@owncloud.com>
Fri, 12 Sep 2014 17:51:47 +0000 (19:51 +0200)
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

index c814e6cb55b6a46f28b9d42566ab8045882bed68..31d11338ef50fded70615f7b08a26dc5b93580c5 100644 (file)
@@ -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);