Skip to content

Commit e346a0b

Browse files
bug fix
1 parent d042b74 commit e346a0b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Frontend/contents-viewer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@
218218
// tagList と 最新のコンテンツ 設定
219219
if ($currentContent->IsRoot()){
220220
$vars['tagList'] = $tag2path;
221-
$out = ContentsDatabaseManager::GetSortedContentsByUpdatedTime(array_keys(ContentsDatabase::$metadata['latest']));
221+
$latest = ContentsDatabase::$metadata['latest'] ?? [];
222+
$out = ContentsDatabaseManager::GetSortedContentsByUpdatedTime(array_keys($latest));
222223

223224
ContentsDatabase::LoadMetadata($metaFileName);
224225
foreach($out['notFounds'] as $path){

Frontend/viewer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@
187187

188188
<div id="content-summary" class="summary">
189189
<?=$vars['contentSummary']?>
190-
<?php if (isset($vars['latestContents'])): ?>
190+
<?php if (isset($vars['latestContents']) && !empty($vars['latestContents'])): ?>
191191
<?=CreateRecentList($vars['latestContents'])?>
192192
<?php endif;?>
193-
<?php if (isset($vars['tagList'])): ?>
193+
<?php if (isset($vars['tagList']) && !empty($vars['tagList'])): ?>
194194
<h3><?=Localization\Localize('tagmap', 'TagMap')?></h3>
195195
<?=CreateTagListElement($vars['tagList'], $vars['rootDirectory'], $vars['layerName'])?>
196196
<?php endif;?>

0 commit comments

Comments
 (0)