diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24851196a..9835aa3e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
bump: version to .6
update: README
update: dependencies
+update: check log file being viewed, for easy deletion log_viewer.php
+fix: empty $cats partials/categories.php
### 28 Jan, 2019
update: composer.json
diff --git a/admin/log_viewer.php b/admin/log_viewer.php
index 2f42e3602..09c3b02da 100644
--- a/admin/log_viewer.php
+++ b/admin/log_viewer.php
@@ -134,7 +134,7 @@ class_check($class);
" . mksize(filesize($file)) . "
-
+
|
";
}
diff --git a/partials/categories.php b/partials/categories.php
index c039a6146..892bc50aa 100644
--- a/partials/categories.php
+++ b/partials/categories.php
@@ -6,15 +6,17 @@
";
$children = '';
-foreach ($grouped as $cat) {
- $main_div .= format_row($cat, 'parent', $cat['name']);
- $children .= "
+if (!empty($cats) && is_array($cats)) {
+ foreach ($grouped as $cat) {
+ $main_div .= format_row($cat, 'parent', $cat['name']);
+ $children .= "
";
- foreach ($cat['children'] as $child) {
- $children .= format_row($child, 'child', $cat['name']);
- }
- $children .= '
+ foreach ($cat['children'] as $child) {
+ $children .= format_row($child, 'child', $cat['name']);
+ }
+ $children .= '
';
+ }
}
$main_div .= "