Closed (fixed)
Project:
Universally Unique IDentifier
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 18:38 UTC
Updated:
15 Jun 2012 at 17:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
balintbrewsThe attached patch works well, it solves the issue. However, I was wondering, maybe instead of the following statement:
We could use this:
Since
property_existschecks if the property exists in the given object, and it returns TRUE even if the property has the value NULL, usingissetis not necessary in my opinion.Also, for the sake of consistency, I would change the statement in the
user_uuid_entities_features_export_entity_alteras well.Comment #2
dixon_Thanks both for the patches. I've committed Bálint's patch in #1. That approach does indeed make a little bit more sense.
This also fixes #1458010: On-behalf hook_uuid_entities_export_entity_alter()s look for nonexistent properties, which is a duplicate of this.
Comment #3
mfbisset($entity->{$property}) || property_exists($entity, $property)is simply a performance optimization - because isset() executes *much* faster than property_exists(). See e.g. http://api.drupal.org/api/drupal/modules%21field%21field.attach.inc/func...