From 9807e78f7273dc18d0ee4036dbe9d9acd9c95857 Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Sun, 9 Apr 2017 12:40:35 +0200 Subject: [PATCH] Use json_encode if we need to return js and not json Turns out the zf1 jsonHelper whas doing some weird stuff to the content-type header under the hood. --- airtime_mvc/application/controllers/LocaleController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php index 421f07a87..7556231e2 100644 --- a/airtime_mvc/application/controllers/LocaleController.php +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -438,7 +438,7 @@ final class LocaleController extends Zend_Controller_Action ); $this->view->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); - header("Content-type: text/javascript"); - echo "var general_dict=".$this->_helper->json->encodeJson($translations); + header("Content-Type: text/javascript"); + echo "var general_dict=" . json_encode($translations); } }