Ignore:
Timestamp:
03/17/10 11:21:02 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Corrigindo a passagem de referências de objetos na factory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/lib/factory/Factory.php

    r2249 r2278  
    103103                                self::$_unsecuredFactory = new WorkflowFactory(); 
    104104 
    105                         return call_user_func_array(array(self::$_unsecuredFactory, $methodName), $args); 
     105                        $className = array_shift($args); 
     106                        return self::$_unsecuredFactory->$methodName($className, $args); 
    106107                } 
    107108                /* oops. we are in the process space (restricted). */ 
     
    112113                                self::$_securedFactory = new ProcessFactory(); 
    113114 
     115                        $className = array_shift($args); 
     116 
    114117                        /** 
    115118                         * If the class is not allowed, we must check who is trying 
     
    118121                         */ 
    119122                        try { 
    120                                 $obj = call_user_func_array(array(self::$_securedFactory, $methodName), $args); 
     123                                $obj = &self::$_securedFactory->$methodName($className, $args); 
    121124                        } 
    122125 
     
    133136                                 */ 
    134137                                if (Security::isSafeDir(2)) 
    135                                         $obj = call_user_func_array(array(self::$_unsecuredFactory, $methodName), $args); 
     138                                        $obj = &self::$_unsecuredFactory->$methodName($className, $args); 
    136139 
    137                                 /* nasty one. take this... */ 
     140                                /* naaasty one. take this! */ 
    138141                                else 
    139142                                        throw($e); 
Note: See TracChangeset for help on using the changeset viewer.