Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify whitelist logic.

  • Loading branch information...
commit a8f4ec0450031071159048e78fc8af4ceb3e6758 1 parent d4db64f
@markstory markstory authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/Cake/Controller/Component/PaginatorComponent.php
View
5 lib/Cake/Controller/Component/PaginatorComponent.php
@@ -377,11 +377,8 @@ public function validateSort(Model $object, array $options, array $whitelist = a
$inWhitelist = in_array($field, $whitelist, true);
if (!$inWhitelist) {
$options['order'] = null;
- return $options;
- }
- if ($inWhitelist) {
- return $options;
}
+ return $options;
}
if (!empty($options['order']) && is_array($options['order'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.