From f79395851b044689567e0e6c9504acbcaa742782 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Tue, 26 Feb 2019 10:11:12 +1000 Subject: Twig update to latest Twig 1.x legacy as per vichan --- .../Sandbox/SecurityNotAllowedPropertyError.php | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 inc/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php (limited to 'inc/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php') diff --git a/inc/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php b/inc/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php new file mode 100644 index 00000000..f27969c1 --- /dev/null +++ b/inc/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php @@ -0,0 +1,40 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedPropertyError extends Twig_Sandbox_SecurityError +{ + private $className; + private $propertyName; + + public function __construct($message, $className, $propertyName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->className = $className; + $this->propertyName = $propertyName; + } + + public function getClassName() + { + return $this->className; + } + + public function getPropertyName() + { + return $this->propertyName; + } +} + +class_alias('Twig_Sandbox_SecurityNotAllowedPropertyError', 'Twig\Sandbox\SecurityNotAllowedPropertyError', false); -- cgit v1.3