Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003829 [Quercus] major always 12-25-09 11:33 01-03-13 08:46
Reporter alexander_hristov View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.34 Product Version 4.0.2
  Product Build
Summary 0003829: Regexp Failure
Description Drupal + DomainAccess has the following regexp in one of its functions:

$pattern = '{
  # Beginning of the string
  ^
  ((?P<anonymous_view>
    # Everything within this set of parentheses is named "anonymous view"
    (?:
      [^()]++ # anything not parentheses
    |
      \( (?P>anonymous_view) \) # an open parenthesis, more "anonymous view" and finally a close parenthesis.
    )*
  )[^()]+WHERE)
}x';

This regexp is subsequently used in preg_match($pattern, $query, $matches)

In this particular use case, query contains the string "SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"

Under Quercus, preg_match fails with the following warning:
warning: com.caucho.quercus.lib.regexp.IllegalRegexpException: Expected '(?:P=name' or '(?:P (?:[^()]++|\( (?P>anonymous_view)\))*)[^()]+WHERE)/ [preg_match] in F:\glassfishv3\glassfish\domains\domain1\applications\planetalia\includes\database.inc on line 338.

Under PHP 5.3.1, works normally.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0006138)
nam
01-03-13 08:46

php/4ed[0-2]

Fixed for 4.0.34.
 

- Issue History
Date Modified Username Field Change
12-25-09 11:33 alexander_hristov New Issue
01-03-13 08:45 nam Status new => assigned
01-03-13 08:45 nam Assigned To  => nam
01-03-13 08:46 nam Status assigned => closed
01-03-13 08:46 nam Note Added: 0006138
01-03-13 08:46 nam Resolution open => fixed
01-03-13 08:46 nam Fixed in Version  => 4.0.34


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