Problem/Motivation

When generating message for EntityMetadataWrapperException, both EntityMetadataWrapper::set() and EntityDrupalWrapper::set() call var_export($value) which sends the return value to output instead returning it which is the intended behavior.

This breaks e.g. JSON responses from e.g. system/ajax calls, if exception occures during processing of ajax request.

Proposed resolution

Replace var_export($value) with var_export($value, TRUE) to correctly return the exported value.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

okaalto created an issue. See original summary.

matrixlord’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
1.35 KB

Hello,

Uploaded fix for current 7 dev version.

richard.thomas’s picture

Status: Needs review » Reviewed & tested by the community

I've run into the same issue of this breaking JSON responses, the patch is very simple and fixes the issue, so I think we can mark this as RTBC.

IshaDakota’s picture

This is committed in 7.x-1.9 - can be closed.

dasj19’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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