Commit 044cbb31 authored by fago's avatar fago

Improve debug output of entity metadata wrapper exceptions.

parent d50db77d
......@@ -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(),
)));
}
......@@ -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(),
)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment