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')){
//...
}
精彩评论