Skip to content

Commit

Permalink
Make it safer
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed Oct 1, 2017
1 parent bb13da5 commit 3dd7345
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ protected function getOptions()

// Account for case that a submitted form has a multi-value category id field (e.g. a filtering form), just use the first category
$oldCat = is_array($oldCat)
? reset($oldCat)
: $oldCat;
? (int) reset($oldCat)
: (int) $oldCat;

$db = JFactory::getDbo();
$user = JFactory::getUser();
Expand Down

0 comments on commit 3dd7345

Please sign in to comment.