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.

CommentFileSizeAuthor
#1 better_array_conversion-2429477-1.patch710 bytesderhasi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derhasi’s picture

Status: Active » Needs review
FileSize
710 bytes

Attached there is the patch simply replacing the conversion.

Chris Matthews’s picture

The 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.