Ignore:
Timestamp:
May 6, 2008 7:49:25 PM (16 years ago)
Author:
quinn
Message:

Truncating output from getDump when used for logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/PayPal.inc.php

    r247 r331  
    8080
    8181        if (!is_array($options) || empty($options)) {
    82             $app->logMsg(sprintf('Invalid options: %s', getDump($options)), LOG_WARNING, __FILE__, __LINE__);
     82            $app->logMsg(sprintf('Invalid options: %s', truncate(getDump($options, true), 128, 'end')), LOG_WARNING, __FILE__, __LINE__);
    8383            return false;
    8484        }
     
    117117
    118118        if (!is_array($options) || empty($options)) {
    119             $app->logMsg(sprintf('Invalid options: %s', getDump($options)), LOG_WARNING, __FILE__, __LINE__);
     119            $app->logMsg(sprintf('Invalid options: %s', truncate(getDump($options, true), 128, 'end')), LOG_WARNING, __FILE__, __LINE__);
    120120            return false;
    121121        }
    122122
    123123        if (isset($this->_buttons[$name])) {
    124             $app->logMsg(sprintf('Overwriting existing button name: %s', getDump($this->_buttons[$name])), LOG_DEBUG, __FILE__, __LINE__);
     124            $app->logMsg(sprintf('Overwriting existing button name: %s', truncate(getDump($this->_buttons[$name], true), 128, 'end')), LOG_DEBUG, __FILE__, __LINE__);
    125125        }
    126126
     
    275275
    276276        if (getPost('test_ipn') == '1' || $this->getParam('test_mode')) {
    277             $app->logMsg(sprintf('Processing PayPal IPN in test mode: %s', getDump(getFormData())), LOG_DEBUG, __FILE__, __LINE__);
     277            $app->logMsg(sprintf('Processing PayPal IPN in test mode: %s', truncate(getDump(getFormData(), true), 128, 'end')), LOG_DEBUG, __FILE__, __LINE__);
    278278            $url = parse_url('https://www.sandbox.paypal.com/cgi-bin/webscr');
    279279        } else {
    280             $app->logMsg(sprintf('Processing PayPal IPN: %s', getDump(getFormData())), LOG_DEBUG, __FILE__, __LINE__);
     280            $app->logMsg(sprintf('Processing PayPal IPN: %s', truncate(getDump(getFormData(), true), 128, 'end')), LOG_DEBUG, __FILE__, __LINE__);
    281281            $url = parse_url($this->getParam('paypal_url'));
    282282        }
Note: See TracChangeset for help on using the changeset viewer.