From e84b837dce02c99ad111e2593a1193032ae1bcee Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 22 Mar 2017 11:15:40 -0400 Subject: [PATCH] Fix issue with updating anime item --- src/Controller/Anime.php | 2 +- src/Util.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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);