{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/comments/241192564","pull_request_review_id":184404664,"id":241192564,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTE5MjU2NA==","diff_hunk":"@@ -88,3 +88,49 @@ function getLotById ($con, $lot_get) {\n \n     return $lot;\n };\n+\n+function getCatIdByName ($con, $cat_name) {\n+    $sql = 'SELECT id\n+    FROM categories \n+    WHERE name = \"' . esc($cat_name) . '\";';\n+\n+    $result = checkQuery($con, $sql);\n+    $cat_id_arr = mysqli_fetch_assoc($result);\n+    if (isset($cat_id_arr) == false) {","path":"functions.php","position":12,"original_position":12,"commit_id":"579be975a515087839fc194f795c7e195ad9c26f","original_commit_id":"579be975a515087839fc194f795c7e195ad9c26f","user":{"login":"caseycs","id":76095,"node_id":"MDQ6VXNlcjc2MDk1","avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false},"body":"Сравнить $cat_id_arr с null можно напрямую, без isset\r\n\r\nНе критично","created_at":"2018-12-12T21:31:46Z","updated_at":"2018-12-12T21:31:46Z","html_url":"https://github.com/htmlacademy-php/830487-yeticave/pull/11#discussion_r241192564","pull_request_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/comments/241192564"},"html":{"href":"https://github.com/htmlacademy-php/830487-yeticave/pull/11#discussion_r241192564"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11","id":237654325,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NjU0MzI1","html_url":"https://github.com/htmlacademy-php/830487-yeticave/pull/11","diff_url":"https://github.com/htmlacademy-php/830487-yeticave/pull/11.diff","patch_url":"https://github.com/htmlacademy-php/830487-yeticave/pull/11.patch","issue_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/11","number":11,"state":"open","locked":false,"title":"Получение данных из форм","user":{"login":"XeniaTkacheva","id":42087229,"node_id":"MDQ6VXNlcjQyMDg3MjI5","avatar_url":"https://avatars0.githubusercontent.com/u/42087229?v=4","gravatar_id":"","url":"https://api.github.com/users/XeniaTkacheva","html_url":"https://github.com/XeniaTkacheva","followers_url":"https://api.github.com/users/XeniaTkacheva/followers","following_url":"https://api.github.com/users/XeniaTkacheva/following{/other_user}","gists_url":"https://api.github.com/users/XeniaTkacheva/gists{/gist_id}","starred_url":"https://api.github.com/users/XeniaTkacheva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XeniaTkacheva/subscriptions","organizations_url":"https://api.github.com/users/XeniaTkacheva/orgs","repos_url":"https://api.github.com/users/XeniaTkacheva/repos","events_url":"https://api.github.com/users/XeniaTkacheva/events{/privacy}","received_events_url":"https://api.github.com/users/XeniaTkacheva/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Получение данных из форм](https://up.htmlacademy.ru/php/7/user/830487/tasks/13)","created_at":"2018-12-11T12:04:59Z","updated_at":"2018-12-12T21:31:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b35b08310d6a1450c84f4435a1f4211975bfa538","assignee":{"login":"caseycs","id":76095,"node_id":"MDQ6VXNlcjc2MDk1","avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false},"assignees":[{"login":"caseycs","id":76095,"node_id":"MDQ6VXNlcjc2MDk1","avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/11/comments","statuses_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/statuses/579be975a515087839fc194f795c7e195ad9c26f","head":{"label":"XeniaTkacheva:module6-task2","ref":"module6-task2","sha":"579be975a515087839fc194f795c7e195ad9c26f","user":{"login":"XeniaTkacheva","id":42087229,"node_id":"MDQ6VXNlcjQyMDg3MjI5","avatar_url":"https://avatars0.githubusercontent.com/u/42087229?v=4","gravatar_id":"","url":"https://api.github.com/users/XeniaTkacheva","html_url":"https://github.com/XeniaTkacheva","followers_url":"https://api.github.com/users/XeniaTkacheva/followers","following_url":"https://api.github.com/users/XeniaTkacheva/following{/other_user}","gists_url":"https://api.github.com/users/XeniaTkacheva/gists{/gist_id}","starred_url":"https://api.github.com/users/XeniaTkacheva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XeniaTkacheva/subscriptions","organizations_url":"https://api.github.com/users/XeniaTkacheva/orgs","repos_url":"https://api.github.com/users/XeniaTkacheva/repos","events_url":"https://api.github.com/users/XeniaTkacheva/events{/privacy}","received_events_url":"https://api.github.com/users/XeniaTkacheva/received_events","type":"User","site_admin":false},"repo":{"id":157487543,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc0ODc1NDM=","name":"PhP-yeticave","full_name":"XeniaTkacheva/PhP-yeticave","private":false,"owner":{"login":"XeniaTkacheva","id":42087229,"node_id":"MDQ6VXNlcjQyMDg3MjI5","avatar_url":"https://avatars0.githubusercontent.com/u/42087229?v=4","gravatar_id":"","url":"https://api.github.com/users/XeniaTkacheva","html_url":"https://github.com/XeniaTkacheva","followers_url":"https://api.github.com/users/XeniaTkacheva/followers","following_url":"https://api.github.com/users/XeniaTkacheva/following{/other_user}","gists_url":"https://api.github.com/users/XeniaTkacheva/gists{/gist_id}","starred_url":"https://api.github.com/users/XeniaTkacheva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XeniaTkacheva/subscriptions","organizations_url":"https://api.github.com/users/XeniaTkacheva/orgs","repos_url":"https://api.github.com/users/XeniaTkacheva/repos","events_url":"https://api.github.com/users/XeniaTkacheva/events{/privacy}","received_events_url":"https://api.github.com/users/XeniaTkacheva/received_events","type":"User","site_admin":false},"html_url":"https://github.com/XeniaTkacheva/PhP-yeticave","description":"Xenia Tkacheva","fork":true,"url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave","forks_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/forks","keys_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/teams","hooks_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/hooks","issue_events_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/events","assignees_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/tags","blobs_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/languages","stargazers_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/stargazers","contributors_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/contributors","subscribers_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/subscribers","subscription_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/subscription","commits_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/merges","archive_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/downloads","issues_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/XeniaTkacheva/PhP-yeticave/deployments","created_at":"2018-11-14T03:53:13Z","updated_at":"2018-12-09T12:53:52Z","pushed_at":"2018-12-12T15:34:56Z","git_url":"git://github.com/XeniaTkacheva/PhP-yeticave.git","ssh_url":"git@github.com:XeniaTkacheva/PhP-yeticave.git","clone_url":"https://github.com/XeniaTkacheva/PhP-yeticave.git","svn_url":"https://github.com/XeniaTkacheva/PhP-yeticave","homepage":null,"size":744,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-php:master","ref":"master","sha":"aa9e35ec394737a0cc2389d29f995a7ea3c945f9","user":{"login":"htmlacademy-php","id":27206120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MjA2MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/27206120?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-php","html_url":"https://github.com/htmlacademy-php","followers_url":"https://api.github.com/users/htmlacademy-php/followers","following_url":"https://api.github.com/users/htmlacademy-php/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-php/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-php/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-php/orgs","repos_url":"https://api.github.com/users/htmlacademy-php/repos","events_url":"https://api.github.com/users/htmlacademy-php/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-php/received_events","type":"Organization","site_admin":false},"repo":{"id":157487507,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc0ODc1MDc=","name":"830487-yeticave","full_name":"htmlacademy-php/830487-yeticave","private":false,"owner":{"login":"htmlacademy-php","id":27206120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MjA2MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/27206120?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-php","html_url":"https://github.com/htmlacademy-php","followers_url":"https://api.github.com/users/htmlacademy-php/followers","following_url":"https://api.github.com/users/htmlacademy-php/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-php/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-php/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-php/orgs","repos_url":"https://api.github.com/users/htmlacademy-php/repos","events_url":"https://api.github.com/users/htmlacademy-php/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-php/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/htmlacademy-php/830487-yeticave","description":"Xenia Tkacheva","fork":false,"url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave","forks_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/forks","keys_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/teams","hooks_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/events","assignees_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/tags","blobs_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/subscription","commits_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/merges","archive_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/downloads","issues_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/deployments","created_at":"2018-11-14T03:52:46Z","updated_at":"2018-12-09T12:49:14Z","pushed_at":"2018-12-12T15:34:58Z","git_url":"git://github.com/htmlacademy-php/830487-yeticave.git","ssh_url":"git@github.com:htmlacademy-php/830487-yeticave.git","clone_url":"https://github.com/htmlacademy-php/830487-yeticave.git","svn_url":"https://github.com/htmlacademy-php/830487-yeticave","homepage":"https://github.com/XeniaTkacheva/PhP-yeticave","size":631,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11"},"html":{"href":"https://github.com/htmlacademy-php/830487-yeticave/pull/11"},"issue":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/11"},"comments":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-php/830487-yeticave/statuses/579be975a515087839fc194f795c7e195ad9c26f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"caseycs"}}