diff --git a/helper.php b/helper.php index aa85d6e..afdd886 100644 --- a/helper.php +++ b/helper.php @@ -76,10 +76,10 @@ function getBlog($ns, $num = NULL, $author = NULL) { // filter by author if ($author && ($meta['user'] != $author)) continue; - $date = $meta['date']['modified']; + $date = $meta['date']['modified'] ?? null; if (!$date) $date = filemtime(wikiFN($id)); if ($this->sort != 'mdate') { - $cdate = $meta['date']['created']; + $cdate = $meta['date']['created'] ?? null; if (!$cdate) $cdate = filectime(wikiFN($id)); // prefer the date further in the past: $date = min($date, $cdate); @@ -104,8 +104,8 @@ function getBlog($ns, $num = NULL, $author = NULL) { 'id' => $id, 'title' => $title, 'date' => $date, - 'user' => $meta['creator'], - 'desc' => $meta['description']['abstract'], + 'user' => $meta['creator'] ?? null, + 'desc' => $meta['description']['abstract'] ?? null, 'exists' => true, 'perm' => $perm, 'draft' => $draft,