Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004056 [Quercus] major sometimes 05-28-10 15:26 05-28-10 15:26
Reporter sblommers View Status public  
Assigned To
Priority normal Resolution open Platform Linux
Status new   OS Ubuntu
Projection none   OS Version 10.04
ETA none Fixed in Version Product Version 4.0.7
  Product Build SVN (latest)
Summary 0004056: Env.getCookies crashing on _request (nullpointer exception) when in scriptcontext mode (JSR)
Description Running Drupal 6.16 functions in SC mode (running node_load etc from script).
Sometimes Env.getCookies is called but in this SC the request and session variables are null (not initialized). I don't know if I'm doing something wrong here but I created a patch for it to not make it crash.
Steps To Reproduce Get cookies in php script when there is no servlet serving the php files but a QuercusEngine or using javax.script ..
Additional Information DIFF against latest SVN 7166

diff -r 0c58513dd2cb modules/quercus/src/com/caucho/quercus/env/
--- a/modules/quercus/src/com/caucho/quercus/env/ Fri May 28 11:54:18 2010 +0200
+++ b/modules/quercus/src/com/caucho/quercus/env/ Sat May 29 00:21:19 2010 +0200
@@ -2641,6 +2641,9 @@
     ArrayValue array = new ArrayValueImpl();
     boolean isMagicQuotes = getIniBoolean("magic_quotes_gpc");
+ if(_request == null)
+ return array;
     Cookie []cookies = _request.getCookies();
     if (cookies != null) {
       for (int i = 0; i < cookies.length; i++) {
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
05-28-10 15:26 sblommers New Issue
05-31-10 03:16 sblommers Issue Monitored: sblommers

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