Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001875 [Quercus] minor always 07-13-07 05:27 07-19-07 16:29
Reporter feherg View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.1.2
Summary 0001875: making geshi run: preg_quote and string comparison problems (svn snapshot 2834)
Description Geshi is a program source code syntax higlighter written in php, it inputs the source code and outputs it colored in html.
It supports a lot of programming languages and several cms systmes are using it. [^]

I'm trying to run geshi under the latest quercus snapshot, but in many cases it produces incorrect html code. (The same was for quercus 3.1.1) I found and fixed two bugs in quercus which seems to solve these problems.
But they might mess other things :)

bug 0000001: string comparision
This problem (bug 1850) is still exists in the svn head. The exact problem is that
the expression "0" == "" evaluates to true, but "" == "0" evaluates to false. Both should evaluate to false.
my fix 0000001:
I think that quercus souldn't do conversions when comparing two variables of the same type.
I only fixed this in, but I think others should also be fixed, like, ...
So the exact fix: replace the beginning of the method eq in with this:
public boolean eq(Value rValue)
    rValue = rValue.toValue();

    if (rValue.isUnicode()) {
        return equals(isUnicode());

bug 0000002: preg_quote
The function preg_quote should quote the . (dot) character but it doesn't do it.
my fix 0000002:
Insert at the and of the following line:
PREG_QUOTE['.'] = true;
And perhaps more characters?

Additional Information
Attached Files

- Relationships

- Notes
07-13-07 05:33

The comparison fix, correctly:
  public boolean eq(Value rValue)
    rValue = rValue.toValue();

    if (rValue.isUnicode()) {
        return equals(rValue);
07-19-07 16:29


- Issue History
Date Modified Username Field Change
07-13-07 05:27 feherg New Issue
07-13-07 05:28 feherg Issue Monitored: feherg
07-13-07 05:33 feherg Note Added: 0002113
07-13-07 18:54 nam Status new => assigned
07-13-07 18:54 nam Assigned To  => nam
07-19-07 16:29 nam Status assigned => closed
07-19-07 16:29 nam Note Added: 0002119
07-19-07 16:29 nam Resolution open => fixed
07-19-07 16:29 nam Fixed in Version  => 3.1.3

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
29 unique queries executed.
Powered by Mantis Bugtracker