From 5a49768614658c266981f450c79e7fdab3dda6f0 Mon Sep 17 00:00:00 2001 From: glaszig Date: Sun, 18 Aug 2019 23:22:43 +0100 Subject: [PATCH] fix renderTemplate() function to allow data-less rendering --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 055f750e..75a6c3cd 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -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"; }