Skip to content

Commit

Permalink
Raise an error if there are no items when pagination is used - featur…
Browse files Browse the repository at this point in the history
…ed articles
  • Loading branch information
philip-sorokin committed Sep 10, 2016
1 parent 74099f1 commit f294e4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/com_content/views/featured/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public function display($tpl = null)
// This makes it much easier for the designer to just interogate the arrays.
$max = count($items);

// Raise an error if there are no items when pagination is used.
if($pagination->get('limitstart') && !$max)
{
JError::raiseError(404, JText::_('JERROR_PAGE_NOT_FOUND'));
}

// The first group is the leading articles.
$limit = $numLeading;

Expand Down

0 comments on commit f294e4a

Please sign in to comment.