|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2836 | minor | always | 08-12-08 07:42 | 08-12-08 14:53 | |
|
|
|||||
| Reporter: | wikipo | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.2.0 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.2.1 | ||
|
|
|||||
| Summary: | 0002836: call_user_func and class method | ||||
| Description: |
call_user_func does not find the method to call if the syntax is: class_name::method_name For example: <?php $func = 'class_name::method_name'; call_user_func($func); ?> gives something like: 'class_name::method_name' not found. |
||||
| Steps To Reproduce: | |||||
| Additional Information: |
I have made a patch in Env.java/createCallback(), after: value = value.toValue(); added the following code: if (value instanceof StringValue) { String s = value.toString(); String[] cm = s.split("::"); if (cm != null && cm.length == 2) { value = new ArrayValueImpl(); value.put(new StringBuilderValue(cm[0])); value.put(new StringBuilderValue(cm[1])); } } Now it behaves correctly. |
||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||