In some situation This errors occurs:
Notice: Undefined property: CommerceOption::$option_id in drupal_write_record() includes/common.inc.

See #1461660: Can't edit line item options

CommentFileSizeAuthor
#1 drupal-1774914.patch463 byteshejazee

Comments

hejazee’s picture

StatusFileSize
new463 bytes

Maybe this is a php bug, however I could solve it by applying this patch which just replaces a line of code with another equivalent line.

- if (!property_exists($object, $field)) {
+ if (!isset($object->$field)) {

Status: Needs review » Needs work

The last submitted patch, drupal-1774914.patch, failed testing.

Anonymous’s picture

property_exists(object, property) is not the same as isset(object->property). A property can exist but is NULL.

Version: 7.14 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.