diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index 5c81a861..90df958e 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -214,7 +214,7 @@ class Anime extends BaseController { */ public function update() { - if ($this->request->getHeader('content-type')[0] === 'application/json') + if (stripos($this->request->getHeader('content-type')[0], 'application/json') !== FALSE) { $data = Json::decode((string)$this->request->getBody()); } diff --git a/src/Util.php b/src/Util.php index 43cc92c3..1dca7425 100644 --- a/src/Util.php +++ b/src/Util.php @@ -91,8 +91,7 @@ class Util { */ public function isViewPage() { - $url = $this->container->get('request') - ->getUri(); + $url = $this->container->get('request')->getUri(); $pageSegments = explode("/", (string) $url); $intersect = array_intersect($pageSegments, self::$formPages);