In some situation This errors occurs:
Notice: Undefined property: CommerceOption::$option_id in drupal_write_record() includes/common.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupal-1774914.patch | 463 bytes | hejazee |
In some situation This errors occurs:
Notice: Undefined property: CommerceOption::$option_id in drupal_write_record() includes/common.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupal-1774914.patch | 463 bytes | hejazee |
Comments
Comment #1
hejazee commentedMaybe 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)) {
Comment #3
Anonymous (not verified) commentedproperty_exists(object, property) is not the same as isset(object->property). A property can exist but is NULL.