Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001922 [Quercus] minor always 08-02-07 02:18 08-02-07 17:42
Reporter nam View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.1.2
Summary 0001922: glob() returning wrong value on NO MATCH
Description (rep by AzMoo)

Hi there. I've been playing around with Quercus for a couple of days now because I've been looking for a combined Java and PHP solution for our Intranet server. Aside from this one issue I'm having I'm very happy with it and I totally commend your efforts. But (there's always a but ;)), it seems that there's a small problem with the return values of the glob function. The PHP Manual (glob) states that it "Returns an array containing the matched files/directories, an empty array if no file matched or FALSE on error," but Quercus returns false on no match. I confirmed this by looking at the code starting on line 1799 of and ending on line 1811.

The globImpl method returns false on no match, resulting in the success variable being false, resulting in glob returning false. The expected return value is an empty array. This is breaking a few apps we have that rely on that empty array being returned during an autoload function. I can rectify it on our end by simply checking for false instead of count(glob($pattern)) > 0, but if I do that and it's implemented properly in the future then it will break again!
Additional Information
Attached Files

- Relationships

- Notes
08-02-07 17:42


- Issue History
Date Modified Username Field Change
08-02-07 02:18 nam New Issue
08-02-07 17:42 nam Status new => assigned
08-02-07 17:42 nam Assigned To  => nam
08-02-07 17:42 nam Status assigned => closed
08-02-07 17:42 nam Note Added: 0002174
08-02-07 17:42 nam Resolution open => fixed
08-02-07 17:42 nam Fixed in Version  => 3.1.3

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