Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm seeing these two warnings when users pay:
Notice: Undefined index: type in Drupal\stripe_checkout\StripeCallback->charge() (line 35 of /srv/bindings/eb2855608a6948439c41e7d233956502/code/modules/contrib/stripe_checkout/src/StripeCallback.php).
Warning: Creating default object from empty value in Drupal\stripe_checkout\StripeCallback->charge() (line 59 of /srv/bindings/eb2855608a6948439c41e7d233956502/code/modules/contrib/stripe_checkout/src/StripeCallback.php).
I'll throw together a patch. Thanks for this module!
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff.txt | 1007 bytes | yanniboi |
#8 | php_warnings-2631052-8.patch | 1.44 KB | yanniboi |
#2 | php_warnings-2631052-2.patch | 990 bytes | kostajh |
Comments
Comment #2
kostajh CreditAttribution: kostajh as a volunteer commentedComment #3
kostajh CreditAttribution: kostajh as a volunteer commentedComment #4
yanniboi CreditAttribution: yanniboi at FreelyGive commentedYes!
Correct me if I'm wrong, but I dont think we need to set $node->revision at all. Will it not create a new revision from $node->revision_log alone?
Comment #5
kostajh CreditAttribution: kostajh as a volunteer commented@yanniboi not sure, that would be a good thing to test. Also, it should be `new \stdClass()`, if someone wants to update this patch.
Comment #6
kostajh CreditAttribution: kostajh as a volunteer commentedComment #7
yanniboi CreditAttribution: yanniboi at FreelyGive commentedI had a quick look at this, and setting $node->revision or leaving it out both update the current revision, but do not create a new revision. Need to have a look how you are supposed to programmatically create a new revision.
Comment #8
yanniboi CreditAttribution: yanniboi at FreelyGive commentedFigured it out, there is a method on the node entity
setNewRevision()
.I also changed
$node->$clicked->value
to$node->{$clicked}->value
to be more readable...