From 6d8163041ced4f917330472675d2d8ffd2123db9 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 24 Sep 2011 13:25:28 +0200 Subject: Fixed bug in relative template path construction. Template "b" was not found, if "a" -ed it and both were in the same, non-root directory. Now fixed. --- stupid_template_engine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stupid_template_engine.php') diff --git a/stupid_template_engine.php b/stupid_template_engine.php index d88adb4..e84bf67 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -1091,7 +1091,7 @@ class STECore $tpl = str_replace("\\", "/", $tpl); if($tpl[0] != "/") $tpl = $this->cur_tpl_dir . "/" . $tpl; - $pathex = array_filter(array_slice(explode("/", $tpl), 1), function($s) { return ($s != ".") and (!empty($s)); }); + $pathex = array_filter(explode("/", $tpl), function($s) { return ($s != ".") and (!empty($s)); }); $pathex = array_merge($pathex); while(($i = array_search("..", $pathex)) !== False) { -- cgit v1.2.3-70-g09d2