Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1685 | major | always | 04-12-07 11:18 | 04-12-07 12:02 | |
|
|||||
Reporter: | hendrikb | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.1 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.1 | ||
|
|||||
Summary: | 0001685: Smarty causes NullPointerException | ||||
Description: |
Quercus: 3.1.X (Revision 2460 from SVN) Using Smarty (2.6.18 latest stable) causes a NullPointerException: java.lang.NullPointerException at com.caucho.quercus.env.BinaryValue.appendTo(BinaryValue.java:180) at com.caucho.quercus.env.StringBuilderValue.append(StringBuilderValue.java:884) at com.caucho.quercus.expr.AppendExpr.eval(AppendExpr.java:90) at com.caucho.quercus.expr.Expr.evalCopy(Expr.java:387) at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:77) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.WhileStatement.execute(WhileStatement.java:60) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:75) at com.caucho.quercus.program.Function.callImpl(Function.java:316) at com.caucho.quercus.program.Function.call(Function.java:264) at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208) at com.caucho.quercus.env.QuercusClass.callMethod(QuercusClass.java:575) at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:575) at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:106) at com.caucho.quercus.expr.Expr.evalCopy(Expr.java:387) at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:77) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:75) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.SwitchStatement.execute(SwitchStatement.java:87) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:75) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.Function.callImpl(Function.java:316) at com.caucho.quercus.program.Function.call(Function.java:264) at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208) at com.caucho.quercus.env.QuercusClass.callMethod(QuercusClass.java:575) at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:575) at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:106) at com.caucho.quercus.expr.Expr.evalBoolean(Expr.java:445) at com.caucho.quercus.expr.NotExpr.evalBoolean(NotExpr.java:72) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:74) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.Function.callImpl(Function.java:316) at com.caucho.quercus.program.Function.call(Function.java:264) at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208) at com.caucho.quercus.env.QuercusClass.callMethod(QuercusClass.java:575) at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:575) at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:106) at com.caucho.quercus.expr.Expr.evalBoolean(Expr.java:445) at com.caucho.quercus.expr.OrExpr.evalBoolean(OrExpr.java:83) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:74) at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:75) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.Function.callImpl(Function.java:316) at com.caucho.quercus.program.Function.call(Function.java:264) at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208) at com.caucho.quercus.env.QuercusClass.callMethod(QuercusClass.java:575) at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:575) at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:106) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.Function.callImpl(Function.java:316) at com.caucho.quercus.program.Function.call(Function.java:264) at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208) at com.caucho.quercus.env.QuercusClass.callMethod(QuercusClass.java:575) at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:575) at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:106) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99) at com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:239) at com.caucho.quercus.script.QuercusScriptEngine.eval(QuercusScriptEngine.java:101) at javax.script.AbstractScriptEngine.eval(Unknown Source) at test.Test.main(Test.java:19) Caused by: com.caucho.quercus.QuercusExecutionException: java.lang.NullPointerException at com.caucho.quercus.env.BinaryValue.appendTo(BinaryValue.java:180) at com.caucho.quercus.env.StringBuilderValue.append(StringBuilderValue.java:884) at com.caucho.quercus.expr.AppendExpr.eval(AppendExpr.java:90) at com.caucho.quercus.expr.Expr.evalCopy(Expr.java:387) at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:77) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.WhileStatement.execute(WhileStatement.java:60) at Smarty._read_file(/C:/test/smarty/Smarty.class.php:1719) at Smarty._fetch_resource_info(/C:/test/smarty/Smarty.class.php:1548) How to reproduce the error: Following the Smarty Quick Install Guide (http://smarty.php.net/quick_start.php) [^] I got the following files and folder locations: C:\test\smarty\* (Smarty Template Engine) C:\test\index.tpl (Demo Template) C:\test\smarty_test.php (Php file to start smarty) Java class to start Quercus engine: public static void main(String[] args) { try { FileReader file = new FileReader("C:\\test\\smarty_test.php"); ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("php"); Writer w = new StringWriter(); engine.getContext().setWriter(w); engine.eval(file); System.out.println(w); } catch (Exception e) { e.printStackTrace(); } } All files are attached. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: | Test.zip [^] (98,569 bytes) 04-12-07 11:18 |
Notes | |||||
|
|||||
|
|