Hello flow developers!
I’ve got an issue with a implementation of the RestController on a single server.
Two instances of the same project were running without problems.
This issue is soveld jet, but we/I want to know what is wrong with the first approach.
To demonstrate what I’ve done is easy. This is the first approach:
class InstanceSetupController extends RestController {
protected $defaultViewObjectName = 'TYPO3\\Flow\\Mvc\\View\\JsonView';
[...]
public function listAction() {
$response[ "result" ] = 0;
[...]
echo json_encode( $response );
} // public function listAction
As I said: this works on two servers. Response is as expected: {"result":0}
On the 3rd server the response is {"re
This is independent from what I “echo”. A
echo "Hello world!";
Ends up in response Hell
(very funny!)
Always there are only 4 chars as output…
Following code works on all three systems:
public function listAction() {
$response[ "result" ] = 0;
[...]
$this->view->assign('value',$response);
} // public function listAction
Of course the second implementation is the better way.
My question now is:
why the first one works on two systems and not on the 3rd?
Any suggestions/hints/estimations???
Thanks!