On line 412 of commerce_paypal.module, this watchdog statement is malformed:

watchdog('commerce_paypal', 'PayPal server response: !param', array('!param' => '<pre>' . check_plain(print_r($response, TRUE)) . '</pre>', WATCHDOG_DEBUG));

Same for line 1329 of commerce_payflow.module:

watchdog('commerce_payflow', 'Payflow server response: !param', array('!param' => '<pre>' . check_plain(print_r($response, TRUE)) . '</pre>', WATCHDOG_DEBUG));

The WATCHDOG_DEBUG constant should not go in the params array but rather should be the third argument passed to the watchdog() function. This will throw a PHP notice on 7.4, "Notice: Trying to access array offset on value of type int in format_string() (line 1816 of /var/www/springboard/includes/bootstrap.inc)."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mthomas created an issue. See original summary.

mthomas’s picture

Patch attached.

mthomas’s picture

Issue summary: View changes
mthomas’s picture

Whoops, found another one. Updated patch attached.

khiminrm’s picture

Status: Active » Needs review
rszrama’s picture

Title: Malformed Watchdog » Watchdog severity constant misplaced in the variables array for two debug logs
Status: Needs review » Fixed

Thanks! Patch looks straightforward, committing.

rszrama’s picture

  • rszrama committed 0e2a10b on 7.x-2.x authored by mthomas
    Issue #3168524 by mthomas, khiminrm, rszrama: Watchdog severity constant...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.