Fixed Undefined method closure::fields() when getting avatar for user, thanks @Romarain [#2422]

This commit is contained in:
Matias Griese
2019-03-22 18:01:22 +02:00
parent a739ed6825
commit 84d995335e
2 changed files with 3 additions and 1 deletions

View File

@@ -3,6 +3,8 @@
1. [](#improved)
* Added `Content-Type: application/json` body support for PSR-7 `ServerRequest`
1. [](#bugfix)
* Fixed `Undefined method closure::fields()` when getting avatar for user, thanks @Romarain [#2422](https://github.com/getgrav/grav/issues/2422)
# v1.6.0-rc.4
## 03/20/2019

View File

@@ -153,7 +153,7 @@ class User extends Data implements UserInterface
public function getMediaFolder()
{
return $this->blueprints->fields()['avatar']['destination'] ?? 'user://accounts/avatars';
return $this->blueprints()->fields()['avatar']['destination'] ?? 'user://accounts/avatars';
}
public function getMediaOrder()