Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
It isn't necessary to insert default values in drupal_write_record() as the database already knows what they are.
Comment | File | Size | Author |
---|---|---|---|
#9 | dont-insert-default-values.patch | 3.62 KB | jbrown |
#8 | dont-insert-default-values.patch | 3.61 KB | jbrown |
#7 | dont-insert-default-values.patch | 1.63 KB | jbrown |
#4 | dont-insert-default-values2.patch | 1.28 KB | jbrown |
#2 | dont-insert-default-values.patch | 1.28 KB | jbrown |
Comments
Comment #2
jbrown CreditAttribution: jbrown commentedAhh, empty fields in the object need to be populated with default values for the caller.
Comment #3
jbrown CreditAttribution: jbrown commentedWhy is it ignored?
Comment #4
jbrown CreditAttribution: jbrown commentedAttempting with different filename.
Comment #5
BerdirBecause the issue is set to needs work :)
Comment #6
Crell CreditAttribution: Crell commentedI think this makes, sense, if I understand it all correctly. :-)
Comment #7
jbrown CreditAttribution: jbrown commentedUpdated a comment.
Benefits of this patch:
Comment #8
jbrown CreditAttribution: jbrown commentedUpdated patch.
Now $record will not be converted to an object if an exception occurs - #731554: drupal_write_record() silently converts an array to an object in case of an exception
Comment #9
jbrown CreditAttribution: jbrown commentedwith new casting coding standards...
Comment #10
Crell CreditAttribution: Crell commentedI'm OK with this assuming the bot is. If that fixes the other issue as well, score.
Comment #11
rfayOK, seems like Crell and the bot are good with it. Who could ask for more?
Looks OK to me. I tested and it resolves #731554: drupal_write_record() silently converts an array to an object in case of an exception and I do like this approach better.
Comment #12
aspilicious CreditAttribution: aspilicious commented#9: dont-insert-default-values.patch queued for re-testing.
Comment #13
aspilicious CreditAttribution: aspilicious commented*Retesting old patches*
Comment #14
jbrown CreditAttribution: jbrown commented#9: dont-insert-default-values.patch queued for re-testing.
Comment #15
jbrown CreditAttribution: jbrown commentedCan this be committed?
Comment #16
webchickThis looks like a nice clean-up. I hope our test coverage here is good...
Committed to HEAD.
Comment #17
jbrown CreditAttribution: jbrown commentedGreat! This one is also ready: #797680: drupal_write_record() unnecessarily sets primary keys while updating