diff --git a/src/Extension/SandboxExtension.php b/src/Extension/SandboxExtension.php index d16e4edd0..dca3262a4 100644 --- a/src/Extension/SandboxExtension.php +++ b/src/Extension/SandboxExtension.php @@ -91,11 +91,11 @@ final class SandboxExtension extends AbstractExtension } } - public function checkPropertyAllowed($obj, $method, int $lineno = -1, Source $source = null) + public function checkPropertyAllowed($obj, $property, int $lineno = -1, Source $source = null) { if ($this->isSandboxed()) { try { - $this->policy->checkPropertyAllowed($obj, $method); + $this->policy->checkPropertyAllowed($obj, $property); } catch (SecurityNotAllowedPropertyError $e) { $e->setSourceContext($source); $e->setTemplateLine($lineno); diff --git a/src/Sandbox/SecurityPolicyInterface.php b/src/Sandbox/SecurityPolicyInterface.php index 8b2ab4a9c..e9e82c965 100644 --- a/src/Sandbox/SecurityPolicyInterface.php +++ b/src/Sandbox/SecurityPolicyInterface.php @@ -31,7 +31,7 @@ interface SecurityPolicyInterface /** * @throws SecurityNotAllowedPropertyError */ - public function checkPropertyAllowed($obj, $method); + public function checkPropertyAllowed($obj, $property); } class_alias('Twig\Sandbox\SecurityPolicyInterface', 'Twig_Sandbox_SecurityPolicyInterface');