mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 19:15:34 +02:00
Merge branch 'develop' of github.com:getgrav/grav into 1.7
Conflicts: CHANGELOG.md
This commit is contained in:
@@ -111,6 +111,13 @@
|
||||
* Optimization: Initialize debugbar only after the configuration has been loaded
|
||||
* Optimization: Combine some early Grav processors into a single one
|
||||
|
||||
# v1.6.16
|
||||
## mm/dd/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed Flex user creation if file storage is being used [#2444](https://github.com/getgrav/grav/issues/2444)
|
||||
* Fixed `Badly encoded JSON data` warning when uploading files [#2663](https://github.com/getgrav/grav/issues/2663)
|
||||
|
||||
# v1.6.15
|
||||
## 08/20/2019
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ use Grav\Framework\File\Formatter\JsonFormatter;
|
||||
use Grav\Framework\File\Formatter\YamlFormatter;
|
||||
use Grav\Framework\Flex\FlexDirectory;
|
||||
use Grav\Framework\Flex\FlexObject;
|
||||
use Grav\Framework\Flex\Storage\FileStorage;
|
||||
use Grav\Framework\Flex\Traits\FlexAuthorizeTrait;
|
||||
use Grav\Framework\Flex\Traits\FlexMediaTrait;
|
||||
use Grav\Framework\Form\FormFlashFile;
|
||||
@@ -424,6 +425,15 @@ class User extends FlexObject implements UserInterface, MediaManipulationInterfa
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
// TODO: We may want to handle this in the storage layer in the future.
|
||||
$key = $this->getStorageKey();
|
||||
if (!$key || strpos($key, '@@')) {
|
||||
$storage = $this->getFlexDirectory()->getStorage();
|
||||
if ($storage instanceof FileStorage) {
|
||||
$this->setStorageKey($this->getKey());
|
||||
}
|
||||
}
|
||||
|
||||
$password = $this->getProperty('password');
|
||||
if (null !== $password) {
|
||||
$this->unsetProperty('password');
|
||||
|
||||
@@ -678,7 +678,7 @@ trait FormTrait
|
||||
foreach ($data as $key => &$value) {
|
||||
if (\is_array($value)) {
|
||||
$value = $this->jsonDecode($value);
|
||||
} elseif ($value === '') {
|
||||
} elseif (trim($value) === '') {
|
||||
unset($data[$key]);
|
||||
} else {
|
||||
$value = json_decode($value, true);
|
||||
|
||||
Reference in New Issue
Block a user