{"action":"closed","number":6160,"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/6160","id":31825231,"html_url":"https://github.com/cakephp/cakephp/pull/6160","diff_url":"https://github.com/cakephp/cakephp/pull/6160.diff","patch_url":"https://github.com/cakephp/cakephp/pull/6160.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6160","number":6160,"state":"closed","locked":false,"title":"3.0 Fix SelectBoxWidget with complex options and the val option","user":{"login":"Tietew","id":51289,"avatar_url":"https://avatars.githubusercontent.com/u/51289?v=3","gravatar_id":"","url":"https://api.github.com/users/Tietew","html_url":"https://github.com/Tietew","followers_url":"https://api.github.com/users/Tietew/followers","following_url":"https://api.github.com/users/Tietew/following{/other_user}","gists_url":"https://api.github.com/users/Tietew/gists{/gist_id}","starred_url":"https://api.github.com/users/Tietew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tietew/subscriptions","organizations_url":"https://api.github.com/users/Tietew/orgs","repos_url":"https://api.github.com/users/Tietew/repos","events_url":"https://api.github.com/users/Tietew/events{/privacy}","received_events_url":"https://api.github.com/users/Tietew/received_events","type":"User","site_admin":false},"body":"`SelectBoxWidget` renders no selected option element when both complex options and the `val` option passed.\r\n\r\nView code:\r\n```php\r\necho $this->Form->select('lang', [\r\n    ['value' => 'pl', 'text' => 'Perl', 'class' => 'perl'],\r\n    ['value' => 'php', 'text' => 'PHP', 'class' => 'php'],\r\n], ['val' => 'php']);\r\n```\r\n\r\nExpected:\r\n```html\r\n<select name=\"lang\">\r\n    <option value=\"pl\" class=\"perl\">Perl</option>\r\n    <option value=\"php\" class=\"php\" selected=\"selected\">PHP</option>\r\n</select>\r\n```\r\n\r\nActual:\r\n```html\r\n<select name=\"lang\">\r\n    <option value=\"pl\" class=\"perl\">Perl</option>\r\n    <option value=\"php\" class=\"php\">PHP</option>\r\n</select>\r\n```\r\n\r\nThe `disabled` option has same issue.","created_at":"2015-03-24T13:22:41Z","updated_at":"2015-03-25T00:18:44Z","closed_at":"2015-03-25T00:18:44Z","merged_at":"2015-03-25T00:18:44Z","merge_commit_sha":"63810f62b556acb85b17d06d15c8f299a303f0b9","assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/35","html_url":"https://github.com/cakephp/cakephp/milestones/3.0.1","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/35/labels","id":1033188,"number":35,"title":"3.0.1","description":"Bugfixes and optimizations for the 3.0 release series.","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":10,"state":"open","created_at":"2015-03-23T01:02:02Z","updated_at":"2015-03-25T00:18:44Z","due_on":"2015-04-05T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/6160/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/6160/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6160/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/b90cf78401880c5868b569b623dc8ba65dda7091","head":{"label":"Tietew:3.0_select_complex_selected","ref":"3.0_select_complex_selected","sha":"b90cf78401880c5868b569b623dc8ba65dda7091","user":{"login":"Tietew","id":51289,"avatar_url":"https://avatars.githubusercontent.com/u/51289?v=3","gravatar_id":"","url":"https://api.github.com/users/Tietew","html_url":"https://github.com/Tietew","followers_url":"https://api.github.com/users/Tietew/followers","following_url":"https://api.github.com/users/Tietew/following{/other_user}","gists_url":"https://api.github.com/users/Tietew/gists{/gist_id}","starred_url":"https://api.github.com/users/Tietew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tietew/subscriptions","organizations_url":"https://api.github.com/users/Tietew/orgs","repos_url":"https://api.github.com/users/Tietew/repos","events_url":"https://api.github.com/users/Tietew/events{/privacy}","received_events_url":"https://api.github.com/users/Tietew/received_events","type":"User","site_admin":false},"repo":{"id":27531760,"name":"cakephp","full_name":"Tietew/cakephp","owner":{"login":"Tietew","id":51289,"avatar_url":"https://avatars.githubusercontent.com/u/51289?v=3","gravatar_id":"","url":"https://api.github.com/users/Tietew","html_url":"https://github.com/Tietew","followers_url":"https://api.github.com/users/Tietew/followers","following_url":"https://api.github.com/users/Tietew/following{/other_user}","gists_url":"https://api.github.com/users/Tietew/gists{/gist_id}","starred_url":"https://api.github.com/users/Tietew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tietew/subscriptions","organizations_url":"https://api.github.com/users/Tietew/orgs","repos_url":"https://api.github.com/users/Tietew/repos","events_url":"https://api.github.com/users/Tietew/events{/privacy}","received_events_url":"https://api.github.com/users/Tietew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tietew/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":true,"url":"https://api.github.com/repos/Tietew/cakephp","forks_url":"https://api.github.com/repos/Tietew/cakephp/forks","keys_url":"https://api.github.com/repos/Tietew/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tietew/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tietew/cakephp/teams","hooks_url":"https://api.github.com/repos/Tietew/cakephp/hooks","issue_events_url":"https://api.github.com/repos/Tietew/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/Tietew/cakephp/events","assignees_url":"https://api.github.com/repos/Tietew/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/Tietew/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/Tietew/cakephp/tags","blobs_url":"https://api.github.com/repos/Tietew/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tietew/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tietew/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tietew/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tietew/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/Tietew/cakephp/languages","stargazers_url":"https://api.github.com/repos/Tietew/cakephp/stargazers","contributors_url":"https://api.github.com/repos/Tietew/cakephp/contributors","subscribers_url":"https://api.github.com/repos/Tietew/cakephp/subscribers","subscription_url":"https://api.github.com/repos/Tietew/cakephp/subscription","commits_url":"https://api.github.com/repos/Tietew/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tietew/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tietew/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tietew/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tietew/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/Tietew/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tietew/cakephp/merges","archive_url":"https://api.github.com/repos/Tietew/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tietew/cakephp/downloads","issues_url":"https://api.github.com/repos/Tietew/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/Tietew/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/Tietew/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/Tietew/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tietew/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/Tietew/cakephp/releases{/id}","created_at":"2014-12-04T08:52:18Z","updated_at":"2014-12-04T08:52:27Z","pushed_at":"2015-03-24T13:07:53Z","git_url":"git://github.com/Tietew/cakephp.git","ssh_url":"git@github.com:Tietew/cakephp.git","clone_url":"https://github.com/Tietew/cakephp.git","svn_url":"https://github.com/Tietew/cakephp","homepage":"http://cakephp.org","size":68790,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cakephp:3.0","ref":"3.0","sha":"09eb23891dc8134830f4e39e01a3a39f82935e41","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","created_at":"2010-05-08T14:38:22Z","updated_at":"2015-03-24T21:43:55Z","pushed_at":"2015-03-25T00:18:44Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":158099,"stargazers_count":5601,"watchers_count":5601,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2513,"mirror_url":null,"open_issues_count":129,"forks":2513,"open_issues":129,"watchers":5601,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6160"},"html":{"href":"https://github.com/cakephp/cakephp/pull/6160"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/6160"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/6160/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6160/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6160/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/b90cf78401880c5868b569b623dc8ba65dda7091"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":63,"deletions":0,"changed_files":2}}