diff --git a/comments.php b/comments.php index 0dfdf68..66f9c91 100644 --- a/comments.php +++ b/comments.php @@ -27,7 +27,10 @@ $q =& $fpdb->getQuery(); - list($id, $entry) = $q->peekEntry(); + list($id, $entry) = @$q->peekEntry(); + if (!$entry) + return $module; + if (!empty($_GET['feed'])){ diff --git a/index.php b/index.php index 5185f12..5b874f5 100644 --- a/index.php +++ b/index.php @@ -17,8 +17,10 @@ function index_permatitle($val, $sep) { global $fpdb; $q =& $fpdb->getQuery(); - list($id, $e) = $q->peekEntry(); - return "$val {$sep} {$e['subject']}"; + list($id, $e) = @$q->peekEntry(); + if ($e) + return "$val {$sep} {$e['subject']}"; + else return $val; } function index_gentitle($val, $sep) { @@ -180,7 +182,7 @@ $fpdb->query($params); $q =& $fpdb->getQuery(); - list($id, $e) = $q->peekEntry(); + list($id, $e) = @$q->peekEntry(); /* no entry found : 404 */