mirror of
https://github.com/getgrav/grav.git
synced 2026-07-04 12:49:06 +02:00
Fixed Object serialization breaking if overriding jsonSerialize() method
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* Fixed clearing cache having no effect on Doctrine cache
|
||||
* Fixed `Medium::relativePath()` for streams
|
||||
* Fixed `FlexObject::update()` call with partial object update
|
||||
* Fixed `Object` serialization breaking if overriding `jsonSerialize()` method
|
||||
|
||||
# v1.6.0-beta.6
|
||||
## 11/12/2018
|
||||
|
||||
@@ -140,7 +140,7 @@ trait ObjectTrait
|
||||
*/
|
||||
protected function doSerialize()
|
||||
{
|
||||
return $this->jsonSerialize();
|
||||
return ['key' => $this->getKey(), 'type' => $this->getType(), 'elements' => $this->getElements()];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -163,7 +163,7 @@ trait ObjectTrait
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ['key' => $this->getKey(), 'type' => $this->getType(), 'elements' => $this->getElements()];
|
||||
return $this->doSerialize();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user