Fix content type parsing in system tags plugin
This commit is contained in:
parent
ffba6d0a7e
commit
cc0f0a940e
|
@ -147,7 +147,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
|
|||
* @throws UnsupportedMediaType if the content type is not supported
|
||||
*/
|
||||
private function createTag($data, $contentType = 'application/json') {
|
||||
if ($contentType === 'application/json') {
|
||||
if (explode(';', $contentType)[0] === 'application/json') {
|
||||
$data = json_decode($data, true);
|
||||
} else {
|
||||
throw new UnsupportedMediaType();
|
||||
|
|
Loading…
Reference in New Issue