php 8 compat: Fix unused key and empty path, for css
This commit is contained in:
@ -273,7 +273,7 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force
|
|||||||
foreach ($directories as $directory) {
|
foreach ($directories as $directory) {
|
||||||
$templateFile = $serendipity['templatePath'] . $directory . $file;
|
$templateFile = $serendipity['templatePath'] . $directory . $file;
|
||||||
if (file_exists($serendipity['serendipityPath'] . $templateFile)) {
|
if (file_exists($serendipity['serendipityPath'] . $templateFile)) {
|
||||||
return $serendipity[$key] . $templateFile;
|
return ($serendipity[$key] ?? '') . $templateFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($serendipity['serendipityPath'] . $templateFile . ".tpl")) {
|
if (file_exists($serendipity['serendipityPath'] . $templateFile . ".tpl")) {
|
||||||
|
@ -38,6 +38,9 @@ switch($css_mode) {
|
|||||||
|
|
||||||
function serendipity_printStylesheet($file, $dir = '') {
|
function serendipity_printStylesheet($file, $dir = '') {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
if (empty($file)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
return "\n/* auto include $dir */\n\n" . str_replace(
|
return "\n/* auto include $dir */\n\n" . str_replace(
|
||||||
array(
|
array(
|
||||||
'{TEMPLATE_PATH}',
|
'{TEMPLATE_PATH}',
|
||||||
|
Reference in New Issue
Block a user