Fix EZP-20287: Error code in legacy not sent to the symfony stack
(cherry picked from commit ff74c66cd71082ac0c41a957ef2e8823fd314fb7)
CS Fixes on LegacyKernelController.php
(cherry picked from commit 95bc8203a4090086c6686c3cff791f5afcde5a2c)