Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002836 [Quercus] minor always 08-12-08 07:42 08-12-08 14:53
Reporter wikipo View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.2.0
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.
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.
Attached Files

- Relationships

- Notes
(0003324)
ferg
08-12-08 14:53

php/1c0c
 

- Issue History
Date Modified Username Field Change
08-12-08 07:42 wikipo New Issue
08-12-08 14:53 ferg Note Added: 0003324
08-12-08 14:53 ferg Assigned To  => ferg
08-12-08 14:53 ferg Status new => closed
08-12-08 14:53 ferg Resolution open => fixed
08-12-08 14:53 ferg Fixed in Version  => 3.2.1


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