app/code/community/Nexcessnet/Turpentine/Helper/Debug.php
protected function _backtrace_formatArgsHelper($arg) {
        $value = $arg;
        if (is_object($arg)) {
            $value = sprintf('OBJECT(%s)', get_class($arg));
        } elseif (is_resource($arg)) {
            $value = 'RESOURCE';
        } elseif (is_array($arg)) {
            $value = 'ARRAY[%s](%s)';
            $c = array();
            foreach ($arg as $k => $v) {
                $c[] = sprintf('%s => %s', $k,
                    $this->_backtrace_formatArgsHelper($v));
            }
            $value = sprintf($value, count($arg), implode(', ', $c));
        } elseif (is_string($arg)) {
            $value = sprintf('\'%s\'', $arg);
        } elseif (is_bool($arg)) {
            $value = $arg ? 'TRUE' : 'FALSE';
        } elseif (is_null($arg)) {
            $value = 'NULL';
        }
        return $value;
    }
protected function _backtrace_formatArgsHelper($arg) {
        $value = $arg;
        if (is_object($arg)) {
            $value = sprintf('OBJECT(%s)', get_class($arg));
        } elseif (is_resource($arg)) {
            $value = 'RESOURCE';
        } elseif (is_array($arg)) {
            $value = 'ARRAY[%s](%s)';
            $c = array();
            foreach ($arg as $k => $v) {
                $c[] = sprintf('%s => %s', $k,
                    $this->_backtrace_formatArgsHelper($v));
            }
            $value = sprintf($value, count($arg), implode(', ', $c));
        } elseif (is_string($arg)) {
            $value = sprintf('\'%s\'', $arg);
        } elseif (is_bool($arg)) {
            $value = $arg ? 'TRUE' : 'FALSE';
        } elseif (is_null($arg)) {
            $value = 'NULL';
        }
        return $value;
    }
protected function _backtrace_formatArgsHelper ( $ arg ) { $ value = $ arg ; if ( is_object ( $ arg ) ) { $ value = sprintf ( 'OBJECT(%s)' , get_class ( $ arg ) ) ; } elseif ( is_resource ( $ arg ) ) { $ value = 'RESOURCE' ; } elseif ( is_array ( $ arg ) ) { $ value = 'ARRAY[%s](%s)' ; $ c = array ( ) ; foreach ( $ arg as $ k => $ v ) { $ c [ ] = sprintf ( '%s => %s' , $ k , $ this -> _backtrace_formatArgsHelper ( $ v ) ) ; } $ value = sprintf ( $ value , count ( $ arg ) , implode ( ', ' , $ c ) ) ; } elseif ( is_string ( $ arg ) ) { $ value = sprintf ( '\'%s\'' , $ arg ) ; } elseif ( is_bool ( $ arg ) ) { $ value = $ arg ? 'TRUE' : 'FALSE' ; } elseif ( is_null ( $ arg ) ) { $ value = 'NULL' ; } return $ value ; }
Format a value for inclusion in the backtrace

@param  mixed $arg
@return null
Format a value for inclusion in the backtrace