mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:00:17 +00:00
Avoid warning
This commit is contained in:
parent
217a8ce6ee
commit
1fa82581b6
2 changed files with 3 additions and 1 deletions
|
@ -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
|
* @return string Path to the file or empty string if the file isn't found
|
||||||
*/
|
*/
|
||||||
function theme_include($file, $root = '') {
|
function theme_include($file, $root = '') {
|
||||||
|
$file = basename($file);
|
||||||
|
|
||||||
// Make sure $root ends with a slash / if it's not blank
|
// Make sure $root ends with a slash / if it's not blank
|
||||||
if ($root !== '' && $root[strlen($root)-1] !== '/') {
|
if ($root !== '' && $root[strlen($root)-1] !== '/') {
|
||||||
$root = $root . '/';
|
$root = $root . '/';
|
||||||
|
|
|
@ -498,7 +498,7 @@ if (isset($_GET["mode"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is no page template use the default page template
|
// If there is no page template use the default page template
|
||||||
if (!$template) {
|
if (empty($template)) {
|
||||||
$template = theme_include("default.php");
|
$template = theme_include("default.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue