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 am programmatically saving a package and I can't get the newly created ID in a proper way, although I could use some technique to get last inserted id from the db, this is hardly the best way of doing so, so attached is a patch that accepts the package by reference and adds the id if it's an insert.
It also removes the casting to object inside the function and casts it before running it only in the single place where the variable is an array.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2456033-n12.patch | 1.08 KB | hanoii |
|
Comments
Comment #1
hanoiiComment #2
hanoiiAttached a wrong patch.
Comment #5
hanoiiI think the tests are failing for some other reason to be honest.
Comment #8
hanoiistrange, I tried running this test locally, and it passed
Comment #9
TR CreditAttribution: TR commentedI think there might have been a change in core, I haven't had time to track that down yet. Regardless, the failure of the Cart Links test has nothing to do with this patch.
Comment #11
TR CreditAttribution: TR commentedCart Lists tests are running green again, so I triggered a retest for this patch. Let's see what happens.
Comment #12
hanoiiRe-rolling