fix renderTemplate() function to allow data-less rendering

This commit is contained in:
glaszig 2019-08-18 23:22:43 +01:00
parent 6985322ca0
commit 5a49768614

View file

@ -578,9 +578,9 @@ function SaveTORAndVPNConfig()
/**
* Renders a simple PHP template
*/
function renderTemplate($name, $data)
function renderTemplate($name, $data = [])
{
$file = "../../templates/$name.php";
$file = realpath(dirname(__FILE__) . "/../templates/$name.php");
if (!file_exists($file)) {
return "template $name ($file) not found";
}