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:
parent
e5295a0d58
commit
9807e78f72
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue