From 6374472e2e1a85309085307d6d425a89f3442637 Mon Sep 17 00:00:00 2001 From: Joas Schilling <nickvergessen@owncloud.com> Date: Thu, 18 Feb 2016 10:12:23 +0100 Subject: [PATCH] No more static --- lib/private/files/storage/common.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 156b49d4e8..edc570c967 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -72,6 +72,7 @@ abstract class Common implements Storage, ILockingStorage { protected $updater; protected $mountOptions = []; + protected $owner = null; public function __construct($parameters) { } @@ -383,13 +384,11 @@ abstract class Common implements Storage, ILockingStorage { * @return string|false uid or false */ public function getOwner($path) { - static $owner; - - if (!isset($owner)) { - $owner = \OC_User::getUser();; + if ($this->owner === null) { + $this->owner = \OC_User::getUser(); } - return $owner; + return $this->owner; } /** -- GitLab