Added isSandbox check around the __toString check

This commit is contained in:
Scott Smith
2014-04-15 17:21:28 +01:00
parent c8366374d9
commit 8dfa4325df
+1 -1
View File
@@ -93,7 +93,7 @@ class Twig_Extension_Sandbox extends Twig_Extension
public function ensureToStringAllowed($obj)
{
if (is_object($obj)) {
if ($this->isSandboxed() && is_object($obj)) {
$this->policy->checkMethodAllowed($obj, '__toString');
}