开发者

Symfony: how to check if a variable saved in sfContext is set or not?

i have this code:

if(sfContext::getInstance()->get('form_signin')){

     //...

}

but im getting this error:

The "form_signin" object does not exist in the current context.

Any right way to check if a variable saved in开发者_JAVA百科 sfContext is set or not ?

Regards

Javi


Simply use the "has" call rather than the get

if(sfContext::getInstance()->has('form_signin')){

     //...

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜