drupal_write_record is using isset($object->$field) to determine if any value should be written to the db. This fails on object members with a value of NULL. This patch fixes that by enumerating the available elements in the object and checking each $field against that list.
Ty for reading.
| Comment | File | Size | Author |
|---|---|---|---|
| common.inc_.diff | 594 bytes | cha0s |
Comments
Comment #1
Anonymous (not verified) commentedPlease supply a unified patch please. Check out the -u diff switch.
Did you test this on PHP 5?
Comment #2
damien tournoud commentedThis is a duplicate of #227677: drupal_write_record can't update a column to NULL.