Share » Forums » Developer » Comparison loop returns true twice...

Comparison loop returns true twice without altering values

Comparison loop returns true twice without altering values

Monday 21 February 2005 11:02:25 am - 3 replies

Author Message

Kristian Hole

Wednesday 23 February 2005 6:04:51 am

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Eirik Alfstad Johansen

Wednesday 23 February 2005 7:11:48 am

Hi Kristian,

Thanks for confirming. I've posted the bug here: http://ez.no/bugs/view/6250

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Kristian Hole

Wednesday 23 February 2005 8:15:51 am

Hi again!

I've closed the bug. The reason for the bug:

This is because of the way PHP works, and the way it converts strings to integers and visa versa. The resolution is to not to compare integers to strings (or to not to compare strings with the number 0).

A resolution to your problem is either to use 7 or -1 as sunday, or use a number for "any".

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu