Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001107 [Quercus] minor always 05-12-06 21:56 05-15-06 16:06
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.20 Product Version 3.0.19
  Product Build
Summary 0001107: <?php at head of script works, <?PHP doesn't
Description The code that checks for the PHP header at the start of a script is case-sensitive. Zend PHP accepts either <?php or <?PHP, but only the former works in Quercus.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0001128)
koreth
05-15-06 14:42

Patch:

--- orig/resin-3.0.s060510/modules/quercus/src/com/caucho/quercus/parser/Quercus
Parser.java 2006-05-10 06:36:54.000000000 -0700
+++ resin-3.0.s060510/modules/quercus/src/com/caucho/quercus/parser/QuercusParse
r.java 2006-05-15 14:36:10.000000000 -0700
@@ -3530,6 +3530,7 @@
     StringBuilder sb = new StringBuilder();
 
     int ch = read();
+ int ch2, ch3;
     while (ch > 0) {
       if (ch == '<') {
        if ((ch = read()) == 's' || ch == 'S') {
@@ -3564,17 +3565,17 @@
 
          return TEXT;
        }
- else if (ch != 'p') {
+ else if (ch != 'p' && ch != 'P') {
          sb.append("<?");
        }
- else if ((ch = read()) != 'h') {
+ else if ((ch2 = read()) != 'h' && ch2 != 'H') {
          sb.append("<?p");
        }
- else if ((ch = read()) != 'p') {
+ else if ((ch3 = read()) != 'p' && ch3 != 'P') {
          sb.append("<?ph");
        }
        else if (! Character.isWhitespace((ch = read()))) {
- sb.append("<?php");
+ sb.append("<?").append((char)ch).append((char)ch2).append((char)ch3);
        }
        else {
          _lexeme = sb.toString();
 
(0001133)
ferg
05-15-06 16:06

php/0007
 

- Issue History
Date Modified Username Field Change
05-12-06 21:56 koreth New Issue
05-15-06 14:42 koreth Note Added: 0001128
05-15-06 16:06 ferg Note Added: 0001133
05-15-06 16:06 ferg Assigned To  => ferg
05-15-06 16:06 ferg Status new => closed
05-15-06 16:06 ferg Resolution open => fixed
05-15-06 16:06 ferg Fixed in Version  => 3.0.20


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