Bug Report

issues comparing email with webmaster_email

Date: 03/15/2010 Show-stopper?:
Status: See Comments Reporter: D. Shun-Luoi Fong
Reported in Version: 2.0.1PB 20100215 Assigned To: Not Assigned
Keywords: Errors, PHP,
Support Thread:

Details

When comparing the

{email} 
variable with the
{webmaster_email} 

variable, two different issues arise:

1. If the two variables are compared in an if statement, a right curly bracket “}” is output as html
2. If the two variables are compared in an if statement, the statement always resolves as true (or false depending on the order of the comparison).
3. If the variables are wrapped in quotes, a PHP error is thrown.

Please see the following URL for further description of the issue:

http://expressionengine.com/forums/viewthread/149136/

Comment on Bug Report

Page 1 of 1 pages
Posted by: Greg Aker on 25 March 2010 4:42pm
Greg Aker's avatar

webmaster_email is a global variable, and not meant to be used in this way. 

Please see:

http://expressionengine.com/docs/templates/globals/conditionals.html

and:

http://expressionengine.com/docs/templates/globals/single_variables.html

Thanks

Posted by: D. Shun-Luoi Fong on 26 March 2010 7:47am
no avatar

Hi Greg,

I read through both links to which you referred, and I’m not seeing where it says you can’t use webmaster_email in a conditional, and why. Sorry if I’m missing it…

In the conditionals doc, I see where they use the ‘username’ global variable in a conditional, e.g. {if username == “elvira”}, although in the example username is being compared to a string rather than another variable.

Is the issue that you can’t compare webmaster_email to another variable, or you can’t use webmaster_email in a conditional at all? I guess I’m not understanding why webmaster_email is “not meant to be used in this way.”

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?