Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)."
Comment | File | Size | Author |
---|---|---|---|
#4 | 3168524-commerce_paypal-watchdog-4.patch | 1.47 KB | mthomas |
#2 | 3168524-commerce_paypal-watchdog.patch | 714 bytes | mthomas |
Comments
Comment #2
mthomas CreditAttribution: mthomas commentedPatch attached.
Comment #3
mthomas CreditAttribution: mthomas commentedComment #4
mthomas CreditAttribution: mthomas commentedWhoops, found another one. Updated patch attached.
Comment #5
khiminrm CreditAttribution: khiminrm at Lemberg Solutions commentedComment #6
rszrama CreditAttribution: rszrama at Centarro commentedThanks! Patch looks straightforward, committing.
Comment #7
rszrama CreditAttribution: rszrama at Centarro commented