From 3e899710d7d1cf0d05278c7b98f7d44ce038a5a6 Mon Sep 17 00:00:00 2001 From: jgen Date: Fri, 25 Apr 2014 17:40:42 -0400 Subject: [PATCH] Stop scrutinizer from complaining here. --- ext/numeric_score/main.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/numeric_score/main.php b/ext/numeric_score/main.php index a5f58440..e2754f5a 100644 --- a/ext/numeric_score/main.php +++ b/ext/numeric_score/main.php @@ -137,6 +137,10 @@ class NumericScore extends Extension { else if($event->page_matches("popular_by_year")){ $dte = array($totaldate, $year, "\\y\\e\\a\\r\=Y", "year"); } + else { + // this should never happen due to the fact that the page event is already matched against earlier. + throw new UnexpectedValueException("Error: Invalid page event."); + } $sql .= " AND NOT numeric_score=0 ORDER BY numeric_score DESC LIMIT :limit OFFSET 0"; //filter images by score != 0 + date > limit to max images on one page > order from highest to lowest score