From: Michael Date: Mon, 14 Aug 2017 05:47:25 +0000 (+0000) Subject: Avoid warning X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1fa82581b68a8aef4129039017659f4f65d4b0d5;p=friendica.git Avoid warning --- diff --git a/include/plugin.php b/include/plugin.php index 1ea3ed73d1..4dd79b521a 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -544,6 +544,8 @@ function upgrade_bool_message($bbcode = false) { * @return string Path to the file or empty string if the file isn't found */ function theme_include($file, $root = '') { + $file = basename($file); + // Make sure $root ends with a slash / if it's not blank if ($root !== '' && $root[strlen($root)-1] !== '/') { $root = $root . '/'; diff --git a/index.php b/index.php index 9ddb47efc6..e67ace1326 100644 --- a/index.php +++ b/index.php @@ -498,7 +498,7 @@ if (isset($_GET["mode"])) { } // If there is no page template use the default page template -if (!$template) { +if (empty($template)) { $template = theme_include("default.php"); }