In uuid.core.inc, there are on-behalf implementations for user and node entities that make sure the property is truly not set (isset() will return false if the value is null, so we have to check for that case), unsetting it in the export if it isn't. However, notices will be thrown when iterating through node properties when the comment module is disabled:

Notice: Undefined property: stdClass::$last_comment_timestamp in node_uuid_entities_features_export_entity_alter() (line 285 of /path/to/uuid/uuid.core.inc).

We have to make sure the properties aren't null, but we aren't checking for the case in which the property doesn't actually exist, causing the warning when we try to reference it. Pairing the condition with a call to property_exists() fixes the problem. Patch to follow shortly.

Comments

alexiswatson’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

Patch attached.

dixon_’s picture

Status: Needs review » Closed (duplicate)

Marking this as a duplicate of #1535802: PHP Notice if comment module is disabled which contains almost the same patch, only slightly simpler.

dixon_’s picture

Issue summary: View changes

s/key/property