Minor fixes (#663)

This commit is contained in:
Roman Kelesidis 2023-03-28 12:17:42 +07:00 committed by GitHub
commit 642e49e77d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View file

@ -379,10 +379,12 @@ function html_ent_decode($txt, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
}
/**
* Makes URL from path
*
* @param string $path
* @return string
*/
function make_url($path = '')
function make_url(string $path = ''): string
{
return FULL_URL . preg_replace('#^\/?(.*?)\/?$#', '\1', $path);
}
@ -390,7 +392,7 @@ function make_url($path = '')
/**
* Functions
*/
require INC_DIR . '/functions.php';
require_once INC_DIR . '/functions.php';
$bb_cfg = array_merge(bb_get_config(BB_CONFIG), $bb_cfg);