<?php

set_include_path('/usr/share/php/smarty3/');
require('Smarty.class.php');

$error_reporting = 1;

// test for CVE-2024-35226; extracted from upstream.
$tpl = new Smarty();

print "\n### escaping.tpl2\n";


try {
    $tpl->fetch('escaping2.tpl');
    print "ERROR\n";
    exit(1);
} catch (Exception $e) {
    echo 'GOOD: Caught exception: ',  $e->getMessage(), "\n";
}

exit(0);

