0

I am passing one optional parameter to route.

Till yesterday this was working, all of sudden getting this error

enter image description here

Controller code

/**
     * @Route("/usersFbVideo",name="_create_fb_social_gration")
     * @Template()
     */
    public function usersFbVideoAction(Request $request, $call_from=null,&$user_visiting_card_path=null)
    {  
     ......
    }

function submit code from .html.twig file

<form id="create_my_video" method="post" action="{{ path('_create_fb_social_gration')}}">                   </form> 
        <div class="popupBg"></div>
        <div class="popupBox small">
          <div class="popup-content">
             Please wait, we are processing your request
          </div>
       </div>

{% endblock %}

{% block javascripts %}
<script>
    $(document).ready(function(){
        $("form").submit();
    });
</script>
{% endblock %}
gkd
  • 853
  • 1
  • 14
  • 31
  • That error means, *you are passing "value/constant" instead of "variable"* to `usersFbVideoAction()` – Ravi Dhoriya ツ Jun 06 '14 at 07:06
  • last 2 params are optional right, when I am submitting, nothing is passed to it.. till yesterday it was working.. :( – gkd Jun 06 '14 at 07:09
  • Sorry, my mistake. Default value `NULL` should work for reference parameters. However did you changed `strict mode`? It will affect strict mode standards. – Ravi Dhoriya ツ Jun 06 '14 at 07:17
  • refer second ans --> http://stackoverflow.com/questions/280385/php-by-reference-parameters-and-default-null – Ravi Dhoriya ツ Jun 06 '14 at 07:27
  • 1
    ok correct, now in symfony what I need to find is how to send null variable to route from twig .. – gkd Jun 06 '14 at 07:34

0 Answers0