[FrameworkBundle] router:debug - better string dumping to avoid namespace escaping

Before this change, the var_export causes namespaces to be escaped:

Before: 'Symfony\\Component\\...'
After:  Symfony\Component\...
This commit is contained in:
Ryan Weaver 2011-04-09 17:53:33 -05:00
parent d91a0747ec
commit 409df12a36

View File

@ -161,6 +161,10 @@ EOF
return sprintf('object(%s)', get_class($value)); return sprintf('object(%s)', get_class($value));
} }
if (is_string($value)) {
return $value;
}
return preg_replace("/\n\s*/s", '', var_export($value, true)); return preg_replace("/\n\s*/s", '', var_export($value, true));
} }
} }