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.

CommentFileSizeAuthor
common.inc_.diff594 bytescha0s

Comments

Anonymous’s picture

Status: Needs review » Needs work

Please supply a unified patch please. Check out the -u diff switch.

Did you test this on PHP 5?

damien tournoud’s picture

Status: Needs work » Closed (duplicate)