Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] 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  
Status new   Product Version 4.0.7
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.
Additional Information DIFF against latest SVN 7166

diff -r 0c58513dd2cb modules/quercus/src/com/caucho/quercus/env/Env.java
--- a/modules/quercus/src/com/caucho/quercus/env/Env.java Fri May 28 11:54:18 2010 +0200
+++ b/modules/quercus/src/com/caucho/quercus/env/Env.java 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-01-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