Skip to content

Commit

Permalink
Improve debug output of entity metadata wrapper exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fago committed Feb 14, 2018
1 parent d50db77 commit 044cbb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/entity.wrapper.inc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ abstract class EntityMetadataWrapper {
if (!$this->validate($value)) {
throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
// An exception's message is output through check_plain().
'!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
'!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
'!location' => $this->debugIdentifierLocation(),
)));
}
Expand Down Expand Up @@ -755,7 +755,7 @@ class EntityDrupalWrapper extends EntityStructureWrapper {
if (!$this->validate($value)) {
throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
// An exception's message is output through check_plain().
'!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
'!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
'!location' => $this->debugIdentifierLocation(),
)));
}
Expand Down

0 comments on commit 044cbb3

Please sign in to comment.