diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-11-02 10:22:36 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-16 19:04:42 +0100 |
commit | e7b1196dd6ca011d8b60764f7c55a5896e96d106 (patch) | |
tree | 6c82560764e29a99d68a5b0ba68e57e5bfb309db /lib/private/Files | |
parent | cc8750ca30ba5d13ca59cc8c3ce87122a451829a (diff) | |
download | nextcloud-server-e7b1196dd6ca011d8b60764f7c55a5896e96d106.tar.gz nextcloud-server-e7b1196dd6ca011d8b60764f7c55a5896e96d106.zip |
Hack to prevent warning for read-only wrapper in public links
Storage wrappers should normally always be registered inside a presetup
hook. However in the public link scenario this is not possible and
there is currently no good alternative with the current architecture.
Instead of logging a warning every time, this fix prevents the warning
to be shown but also adds a FIXME in the code for the future. This is
ok because this app is already using private/internal APIs at the
moment and should be reworked properly in the future.
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Filesystem.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index ac0e66973d4..3f776a1a809 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -214,10 +214,13 @@ class Filesystem { /** * @param bool $shouldLog + * @return bool previous value * @internal */ public static function logWarningWhenAddingStorageWrapper($shouldLog) { - self::$logWarningWhenAddingStorageWrapper = (bool)$shouldLog; + $previousValue = self::$logWarningWhenAddingStorageWrapper; + self::$logWarningWhenAddingStorageWrapper = (bool) $shouldLog; + return $previousValue; } /** |