Fix issue with updating anime item

This commit is contained in:
Timothy Warren 2017-03-22 11:15:40 -04:00
parent a58d654d1d
commit e84b837dce
2 changed files with 2 additions and 3 deletions

View File

@ -214,7 +214,7 @@ class Anime extends BaseController {
*/ */
public function update() 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()); $data = Json::decode((string)$this->request->getBody());
} }

View File

@ -91,8 +91,7 @@ class Util {
*/ */
public function isViewPage() public function isViewPage()
{ {
$url = $this->container->get('request') $url = $this->container->get('request')->getUri();
->getUri();
$pageSegments = explode("/", (string) $url); $pageSegments = explode("/", (string) $url);
$intersect = array_intersect($pageSegments, self::$formPages); $intersect = array_intersect($pageSegments, self::$formPages);