Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current implementation of simply casting the Entity object to array, leads to problems when debugging with xdebug. The Debugger breaks when stepping over line 496.
The reason seams to be a bug in xdebug. But we can avoid that with replacing (array) $entity
with get_object_vars($entity)
. As the implementation only needs access to the public properties, this should be fine.
I'll post a patch for this in the next comment.
Comment | File | Size | Author |
---|---|---|---|
#1 | better_array_conversion-2429477-1.patch | 710 bytes | derhasi |
Comments
Comment #1
derhasi CreditAttribution: derhasi commentedAttached there is the patch simply replacing the conversion.
Comment #2
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch to entity.controller.inc applied cleanly to the latest entity 7.x-1.x-dev and (if still relevant) needs review.