Changeset 2953


Ignore:
Timestamp:
06/18/10 09:29:11 (14 years ago)
Author:
asaikawa
Message:

Ticket #446 - Ajustes na mensagem de warning gerada, verificando se ha nome da classe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/common_functions.inc.php

    r2935 r2953  
    2323{ 
    2424        $caller = next(debug_backtrace()); 
    25         $deprecated_msg = "Deprecated method <strong>" . $caller['function'] . "</strong> of <strong>" . $caller['class'] . "</strong> object was called in <strong>" . $caller['file'] . "</strong> on line <strong>" . $caller['line'] . "</strong>. It MUST be replaced by its equivalent"; 
    26         if(!empty($new_class) && !empty($new_method)) 
    27                 $deprecated_msg .= sprintf(' <strong>%s</strong> of <strong>%s</strong> object', $new_method, $new_class); 
     25        $old_class = !empty($caller['class']) ? " of <strong>" . $caller['class'] . "</strong> object" : ""; 
     26        $deprecated_msg = sprintf("Deprecated method <strong>%s</strong>%s was called in <strong>%s</strong> on line <strong>%s</strong>. It MUST be replaced by its equivalent", 
     27                                                                $caller['function'], $old_class, $caller['file'], $caller['line']); 
     28        if(!empty($new_class) && !empty($new_method)){ 
     29                $new_class = !empty($new_class) ? " of <strong>" . $new_class . "</strong> object" : ""; 
     30                $deprecated_msg .= sprintf(' <strong>%s</strong>%s', $new_method, $new_class); 
     31        } 
    2832        $error_msg = $deprecated_msg . ".\n<br>Error handler"; 
    2933        return trigger_error("[WORKFLOW WARNING]: " . $error_msg, E_USER_WARNING); 
Note: See TracChangeset for help on using the changeset viewer.