Variable does not exist in symfony2

前端 未结 1 1805
情话喂你
情话喂你 2021-01-19 00:12

I have the following problem on my symfony2 project:

This is the code of my controller

public function showCustomerAction($id) {
    // retrieve the          


        
相关标签:
1条回答
  • 2021-01-19 00:59

    It looks like a characters issue. There are fake spaces char(194) in your {{ customer }}.
    Try just removing them and add a real space instead.

    This character occurs when you hit Alt Gr + Space (it happens to me alot)

    Hints

    • TWIG ignores spaces and wouldn't result in an error if there was a real space issue
    • Mostly, when you see

      Variable "foo " does not exists

      it means you have this character after the foo variable

    0 讨论(0)
提交回复
热议问题