When passing an entity to createIndividualDataFromEntity the system crashes.

assert(Inspector::assertAllObjects($data, ResourceObject::class, EntityAccessDeniedHttpException::class))

That is because the code passes the first item in the array iterator, which is a resource object. ResourceObjectData assumes it'll receive an array of ResourceObjects.

CommentFileSizeAuthor
#2 3090606-2.patch664 bytesmglaman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review
FileSize
664 bytes

This fixes my tests for Cart API which is using the method.

  • mglaman committed 367fb96 on 8.x-1.x
    Issue #3090606 by mglaman: createIndividualDataFromEntity needs to pass...
mglaman’s picture

Status: Needs review » Fixed

Fixed. There should probably be a test 😬 but this way it unblocks the Commerce Cart API.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.