Anonymous | Login | Signup for a new account | 12-17-2024 08:51 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001459 | [Quercus] | major | always | 11-15-06 09:15 | 06-05-07 22:09 | ||||
Reporter | Anoop K Achuthan | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.21 | ||||||
Summary | 0001459: php sort function doesn't work with objects as array elements | ||||||||
Description |
wordpress uses sort function to sort an array containing objects as elements. Quercus throws the following exception : ----------------------------------------------------------- java.lang.RuntimeException: not implemented at com.caucho.quercus.env.ObjectValue.cmpObject(ObjectValue.java:92) at com.caucho.quercus.env.Value.cmp(Value.java:213) at com.caucho.quercus.env.Value.lt(Value.java:239) at com.caucho.quercus.env.ArrayValue$ValueComparator.compare(ArrayValue.java:1276) at com.caucho.quercus.lib.ArrayModule$CompareNormal.compare(ArrayModule.java:3378) at com.caucho.quercus.lib.ArrayModule$CompareNormal.compare(ArrayModule.java:3353) at java.util.Arrays.mergeSort(Arrays.java:1284) at java.util.Arrays.sort(Arrays.java:1223) at com.caucho.quercus.env.ArrayValue.sort(ArrayValue.java:701) at com.caucho.quercus.lib.ArrayModule.sort(ArrayModule.java:1503) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:114) at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:529) at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:402) at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:388) at com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:181) at com.caucho.quercus.expr.FunctionExpr.eval(FunctionExpr.java:126) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:76) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:112) at com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:246) at com.caucho.quercus.page.InterpretedPage.execute(InterpretedPage.java:71) ........ ----------------------------------------------------------------------- |
||||||||
Additional Information |
Sample program to reproduce the error: <?php $x1 = (object) "lemon"; $x2 = (object) "orange"; $fruits = array(); array_push($fruits,$x1,$x2); sort($fruits); foreach ($fruits as $key => $val) { echo "fruits[" . $key . "] = " . $val. "\n"; } ?> |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |