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.
This commit is contained in:
Lucas Bickel 2017-04-09 12:40:35 +02:00
parent e5295a0d58
commit 9807e78f72
1 changed files with 2 additions and 2 deletions

View File

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