{"action":"created","comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/23112150","id":23112150,"diff_hunk":"@@ -375,7 +375,11 @@ protected function findAll($entityClass, $page = 1, $maxPerPage = 15, $sortField\n         ;\n \n         if (null !== $sortField) {\n-            $query->orderBy('entity.'.$sortField, $sortDirection ?: 'DESC');\n+            if (!$sortDirection || !in_array(strtoupper($sortDirection), array('ASC', 'DESC'))) {","path":"Controller/AdminController.php","position":14,"original_position":14,"commit_id":"12046fbcedcb0be869e5521e6655a1cfd4e0389c","original_commit_id":"c245ec500b14bfa04d45a3fa9dc949c6577ebd67","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"And you are right of course! In this controller everything is \"overridable\", so I should always take that into account. Thanks.","created_at":"2015-01-16T21:51:45Z","updated_at":"2015-01-16T21:51:45Z","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14#discussion_r23112150","pull_request_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/23112150"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14#discussion_r23112150"},"pull_request":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14","id":27509394,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14","diff_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14.diff","patch_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14.patch","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/14","number":14,"state":"open","locked":false,"title":"use only valid sort directions","user":{"login":"xabbuh","id":1957048,"avatar_url":"https://avatars.githubusercontent.com/u/1957048?v=3","gravatar_id":"","url":"https://api.github.com/users/xabbuh","html_url":"https://github.com/xabbuh","followers_url":"https://api.github.com/users/xabbuh/followers","following_url":"https://api.github.com/users/xabbuh/following{/other_user}","gists_url":"https://api.github.com/users/xabbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/xabbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabbuh/subscriptions","organizations_url":"https://api.github.com/users/xabbuh/orgs","repos_url":"https://api.github.com/users/xabbuh/repos","events_url":"https://api.github.com/users/xabbuh/events{/privacy}","received_events_url":"https://api.github.com/users/xabbuh/received_events","type":"User","site_admin":false},"body":"fixes #9","created_at":"2015-01-16T14:41:52Z","updated_at":"2015-01-16T21:51:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24f0abfc166b5f2bd93adb79a4a208ff1cb6957e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14/commits","review_comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14/comments","review_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/14/comments","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/12046fbcedcb0be869e5521e6655a1cfd4e0389c","head":{"label":"xabbuh:issue-9","ref":"issue-9","sha":"12046fbcedcb0be869e5521e6655a1cfd4e0389c","user":{"login":"xabbuh","id":1957048,"avatar_url":"https://avatars.githubusercontent.com/u/1957048?v=3","gravatar_id":"","url":"https://api.github.com/users/xabbuh","html_url":"https://github.com/xabbuh","followers_url":"https://api.github.com/users/xabbuh/followers","following_url":"https://api.github.com/users/xabbuh/following{/other_user}","gists_url":"https://api.github.com/users/xabbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/xabbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabbuh/subscriptions","organizations_url":"https://api.github.com/users/xabbuh/orgs","repos_url":"https://api.github.com/users/xabbuh/repos","events_url":"https://api.github.com/users/xabbuh/events{/privacy}","received_events_url":"https://api.github.com/users/xabbuh/received_events","type":"User","site_admin":false},"repo":{"id":29350859,"name":"EasyAdminBundle","full_name":"xabbuh/EasyAdminBundle","owner":{"login":"xabbuh","id":1957048,"avatar_url":"https://avatars.githubusercontent.com/u/1957048?v=3","gravatar_id":"","url":"https://api.github.com/users/xabbuh","html_url":"https://github.com/xabbuh","followers_url":"https://api.github.com/users/xabbuh/followers","following_url":"https://api.github.com/users/xabbuh/following{/other_user}","gists_url":"https://api.github.com/users/xabbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/xabbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabbuh/subscriptions","organizations_url":"https://api.github.com/users/xabbuh/orgs","repos_url":"https://api.github.com/users/xabbuh/repos","events_url":"https://api.github.com/users/xabbuh/events{/privacy}","received_events_url":"https://api.github.com/users/xabbuh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xabbuh/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":true,"url":"https://api.github.com/repos/xabbuh/EasyAdminBundle","forks_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/xabbuh/EasyAdminBundle/releases{/id}","created_at":"2015-01-16T14:07:24Z","updated_at":"2015-01-16T14:07:24Z","pushed_at":"2015-01-16T19:36:10Z","git_url":"git://github.com/xabbuh/EasyAdminBundle.git","ssh_url":"git@github.com:xabbuh/EasyAdminBundle.git","clone_url":"https://github.com/xabbuh/EasyAdminBundle.git","svn_url":"https://github.com/xabbuh/EasyAdminBundle","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"javiereguiluz:master","ref":"master","sha":"6f89cf5f1dc99c96292678c60a5a145a6f466f02","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","created_at":"2015-01-12T08:43:02Z","updated_at":"2015-01-16T21:51:42Z","pushed_at":"2015-01-16T19:52:47Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":0,"stargazers_count":177,"watchers_count":177,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/14"},"issue":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/14"},"comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/12046fbcedcb0be869e5521e6655a1cfd4e0389c"}}}}