Fix content type parsing in system tags plugin

This commit is contained in:
Vincent Petry 2016-01-20 11:51:06 +01:00
parent ffba6d0a7e
commit cc0f0a940e
1 changed files with 1 additions and 1 deletions

View File

@ -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();