• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

BUG Comparison operator changed by editor - breaks php code

Brad

New member
Messages
3
Likes
0
Points
1
#1
The snippets editor is changing one of my operators, causing the code to fail. I have the following line in my code:

Code:
if (($initials == "ABC") && (date('y-m-d', $today) <= $datecompare)) {
The editor changes the "<=" operator by adding a space so it reads like this:
Code:
if (($initials == "ABC") && (date('y-m-d', $today) < = $datecompare)) {
This causes an error and the code won't run. I can get the code to successfully execute by changing the comparison to just "<".

I tried toggling the HTML Entities preference, but it made no difference. Every time I correct the code, then save, the editor inserts the space.

Any suggestions?
 

Brad

New member
Messages
3
Likes
0
Points
1
#2
One piece of additional information:
I can go into PHPmyAdmin and delete the space... then my code executes properly.
 

Temyk

Support team
Staff member
Messages
125
Likes
10
Points
18
#3
Hi,

The code editor should not change anything in the code. May be other plug-ins?

What version of Woody plugin do you have installed? Can you send us a screenshot of the error?