Skip to content

Commit

Permalink
Minor improvement in a comparison expression
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Apr 11, 2015
1 parent 715d74a commit 0703d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ protected function findAll($entityClass, $page = 1, $maxPerPage = 15, $sortField
;

if (null !== $sortField) {
if (!$sortDirection || !in_array(strtoupper($sortDirection), array('ASC', 'DESC'))) {
if (empty($sortDirection) || !in_array(strtoupper($sortDirection), array('ASC', 'DESC'))) {
$sortDirection = 'DESC';
}

Expand Down

0 comments on commit 0703d07

Please sign in to comment.