When creating a JsonApi view using the MVCFactory an error is produced if the optional options are not completed with a contentType.
No error should be raised.
An error is raised and the processing stops.
The constructor code in JsonApiView (within the MVC Library) is:
if (\array_key_exists('contentType', $config)) {
$this->type = $config['contentType'];
}
if ($this->serializer === null) {
$this->serializer = new JoomlaSerializer($this->type);
}
It should be:
if (\array_key_exists('contentType', $config)) {
$this->type = $config['contentType'];
if ($this->serializer === null) {
$this->serializer = new JoomlaSerializer($this->type);
}
}
So that the serializer is only called if the contentType option has been supplied.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Labels |
Added:
PBF
|
Labels |
Removed:
PBF
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-28 19:21:34 |
Closed_By | ⇒ | Hackwar |
I created a PR: #43179 Closing this issue.