Fixed null pointer exception on SpeakerEditPermissionRequest
Serializer Change-Id: I1b716dc498afdd116fd449c924c70b3cac647d24
This commit is contained in:
parent
66f67e08c9
commit
c0a0b39bd8
|
@ -144,7 +144,7 @@ abstract class AbstractSerializer implements IModelSerializer
|
|||
foreach ($mappings as $attribute => $mapping) {
|
||||
$mapping = preg_split('/:/', $mapping);
|
||||
if(count($fields) > 0 && !in_array($mapping[0], $fields)) continue;
|
||||
|
||||
$value = null;
|
||||
foreach($method_prefix as $prefix){
|
||||
if(method_exists($this->object, $prefix.$attribute)){
|
||||
$value = call_user_func([$this->object, $prefix.$attribute ]);
|
||||
|
|
|
@ -112,9 +112,9 @@ class SpeakerEditPermissionRequest extends SilverstripeBaseModel
|
|||
}
|
||||
|
||||
/**
|
||||
* @return DateTime
|
||||
* @return ?DateTime
|
||||
*/
|
||||
public function getApprovedDate():DateTime
|
||||
public function getApprovedDate():?DateTime
|
||||
{
|
||||
return $this->approved_date;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue