dongyao5843 2011-06-19 14:42
浏览 73
已采纳

Smarty中的未定义变量

I'm using DooPHP and I'm generating a security token for my form to protect against csrf attacks. I'm assigning the token to a smarty variable and I can see that it is displayed in the source - so it is available. When I submit the form though, it throws out an error saying:

Undefined variable: secToken
See file C:\wamp\www\korysdoo\protected\class\smarty\sysplugins\smarty_internal_data.php
Error on line 291 $x = $$_variable;

Any ideas what can be wrong? I can see that the value of secToken is being posted to an appropriate function.

  • 写回答

2条回答 默认 最新

  • dtr32221 2011-06-19 16:11
    关注

    Problem solved. Though it was lying somewhere else. When the login was unsuccessful (which it was, for different reasons), I was displaying the same login form template without assigning the security token again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?