{"action":"created","comment":{"url":"https://api.github.com/repos/phpredis/phpredis/pulls/comments/180304411","pull_request_review_id":110700517,"id":180304411,"diff_hunk":"@@ -2626,50 +2666,77 @@ static int get_georadius_opts(HashTable *ht, int *withcoord, int *withdist,\n             optstr = Z_STRVAL_P(optval);\n \n             if (!strcasecmp(optstr, \"withcoord\")) {\n-                *withcoord = 1;\n+                o->withcoord = 1;\n             } else if (!strcasecmp(optstr, \"withdist\")) {\n-                *withdist = 1;\n+                o->withdist = 1;\n             } else if (!strcasecmp(optstr, \"withhash\")) {\n-                *withhash = 1;\n+                o->withhash = 1;\n             } else if (!strcasecmp(optstr, \"asc\")) {\n-                *sort = SORT_ASC;\n+                o->sort = SORT_ASC;\n             } else if (!strcasecmp(optstr, \"desc\")) {\n-                *sort = SORT_DESC;\n+                o->sort = SORT_DESC;\n             }\n         }\n     } ZEND_HASH_FOREACH_END();\n \n+    /* STORE and STOREDIST are not compatible with the WITH* options */\n+    if (o->key != NULL && (o->withcoord || o->withdist || o->withhash)) {\n+        php_error_docref(NULL TSRMLS_CC, E_WARNING,\n+            \"STORE[DIST] is not compatible with WITHCOORD, WITHDIST or WITHHASH\");\n+\n+        if (o->key) zend_string_release(o->key);\n+        return FAILURE;\n+    }\n+\n     /* Success */\n     return SUCCESS;\n }\n \n /* Helper to append options to a GEORADIUS or GEORADIUSBYMEMBER command */\n-void append_georadius_opts(smart_string *str, int withcoord, int withdist,\n-                           int withhash, long count, geoSortType sort)\n+void append_georadius_opts(RedisSock *redis_sock, smart_string *str, short *slot,\n+                           geoOptions *opt)","path":"redis_commands.c","position":121,"original_position":121,"commit_id":"02dcf48c64c827f5582e3c170056c4b8bd611a84","original_commit_id":"02dcf48c64c827f5582e3c170056c4b8bd611a84","user":{"login":"yatsukhnenko","id":1374472,"avatar_url":"https://avatars0.githubusercontent.com/u/1374472?v=4","gravatar_id":"","url":"https://api.github.com/users/yatsukhnenko","html_url":"https://github.com/yatsukhnenko","followers_url":"https://api.github.com/users/yatsukhnenko/followers","following_url":"https://api.github.com/users/yatsukhnenko/following{/other_user}","gists_url":"https://api.github.com/users/yatsukhnenko/gists{/gist_id}","starred_url":"https://api.github.com/users/yatsukhnenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatsukhnenko/subscriptions","organizations_url":"https://api.github.com/users/yatsukhnenko/orgs","repos_url":"https://api.github.com/users/yatsukhnenko/repos","events_url":"https://api.github.com/users/yatsukhnenko/events{/privacy}","received_events_url":"https://api.github.com/users/yatsukhnenko/received_events","type":"User","site_admin":false},"body":"In `get_georadius_opts` you use `geoOptions *o` but here is `geoOptions *opt`","created_at":"2018-04-10T06:00:37Z","updated_at":"2018-04-10T06:03:46Z","html_url":"https://github.com/phpredis/phpredis/pull/1335#discussion_r180304411","pull_request_url":"https://api.github.com/repos/phpredis/phpredis/pulls/1335","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/comments/180304411"},"html":{"href":"https://github.com/phpredis/phpredis/pull/1335#discussion_r180304411"},"pull_request":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/1335"}}},"pull_request":{"url":"https://api.github.com/repos/phpredis/phpredis/pulls/1335","id":180121991,"html_url":"https://github.com/phpredis/phpredis/pull/1335","diff_url":"https://github.com/phpredis/phpredis/pull/1335.diff","patch_url":"https://github.com/phpredis/phpredis/pull/1335.patch","issue_url":"https://api.github.com/repos/phpredis/phpredis/issues/1335","number":1335,"state":"open","locked":false,"title":"Issue.1334","user":{"login":"michael-grunder","id":468149,"avatar_url":"https://avatars1.githubusercontent.com/u/468149?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-grunder","html_url":"https://github.com/michael-grunder","followers_url":"https://api.github.com/users/michael-grunder/followers","following_url":"https://api.github.com/users/michael-grunder/following{/other_user}","gists_url":"https://api.github.com/users/michael-grunder/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-grunder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-grunder/subscriptions","organizations_url":"https://api.github.com/users/michael-grunder/orgs","repos_url":"https://api.github.com/users/michael-grunder/repos","events_url":"https://api.github.com/users/michael-grunder/events{/privacy}","received_events_url":"https://api.github.com/users/michael-grunder/received_events","type":"User","site_admin":false},"body":"Implements STORE and STOREDIST for GEORADIUS","created_at":"2018-04-07T19:52:08Z","updated_at":"2018-04-10T06:03:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98c8ae02f2308992f5fd35811dc8f08f54d88975","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phpredis/phpredis/pulls/1335/commits","review_comments_url":"https://api.github.com/repos/phpredis/phpredis/pulls/1335/comments","review_comment_url":"https://api.github.com/repos/phpredis/phpredis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpredis/phpredis/issues/1335/comments","statuses_url":"https://api.github.com/repos/phpredis/phpredis/statuses/02dcf48c64c827f5582e3c170056c4b8bd611a84","head":{"label":"phpredis:issue.1334","ref":"issue.1334","sha":"02dcf48c64c827f5582e3c170056c4b8bd611a84","user":{"login":"phpredis","id":10171267,"avatar_url":"https://avatars2.githubusercontent.com/u/10171267?v=4","gravatar_id":"","url":"https://api.github.com/users/phpredis","html_url":"https://github.com/phpredis","followers_url":"https://api.github.com/users/phpredis/followers","following_url":"https://api.github.com/users/phpredis/following{/other_user}","gists_url":"https://api.github.com/users/phpredis/gists{/gist_id}","starred_url":"https://api.github.com/users/phpredis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpredis/subscriptions","organizations_url":"https://api.github.com/users/phpredis/orgs","repos_url":"https://api.github.com/users/phpredis/repos","events_url":"https://api.github.com/users/phpredis/events{/privacy}","received_events_url":"https://api.github.com/users/phpredis/received_events","type":"Organization","site_admin":false},"repo":{"id":1482997,"name":"phpredis","full_name":"phpredis/phpredis","owner":{"login":"phpredis","id":10171267,"avatar_url":"https://avatars2.githubusercontent.com/u/10171267?v=4","gravatar_id":"","url":"https://api.github.com/users/phpredis","html_url":"https://github.com/phpredis","followers_url":"https://api.github.com/users/phpredis/followers","following_url":"https://api.github.com/users/phpredis/following{/other_user}","gists_url":"https://api.github.com/users/phpredis/gists{/gist_id}","starred_url":"https://api.github.com/users/phpredis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpredis/subscriptions","organizations_url":"https://api.github.com/users/phpredis/orgs","repos_url":"https://api.github.com/users/phpredis/repos","events_url":"https://api.github.com/users/phpredis/events{/privacy}","received_events_url":"https://api.github.com/users/phpredis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpredis/phpredis","description":"A PHP extension for Redis","fork":false,"url":"https://api.github.com/repos/phpredis/phpredis","forks_url":"https://api.github.com/repos/phpredis/phpredis/forks","keys_url":"https://api.github.com/repos/phpredis/phpredis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpredis/phpredis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpredis/phpredis/teams","hooks_url":"https://api.github.com/repos/phpredis/phpredis/hooks","issue_events_url":"https://api.github.com/repos/phpredis/phpredis/issues/events{/number}","events_url":"https://api.github.com/repos/phpredis/phpredis/events","assignees_url":"https://api.github.com/repos/phpredis/phpredis/assignees{/user}","branches_url":"https://api.github.com/repos/phpredis/phpredis/branches{/branch}","tags_url":"https://api.github.com/repos/phpredis/phpredis/tags","blobs_url":"https://api.github.com/repos/phpredis/phpredis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpredis/phpredis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpredis/phpredis/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpredis/phpredis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpredis/phpredis/statuses/{sha}","languages_url":"https://api.github.com/repos/phpredis/phpredis/languages","stargazers_url":"https://api.github.com/repos/phpredis/phpredis/stargazers","contributors_url":"https://api.github.com/repos/phpredis/phpredis/contributors","subscribers_url":"https://api.github.com/repos/phpredis/phpredis/subscribers","subscription_url":"https://api.github.com/repos/phpredis/phpredis/subscription","commits_url":"https://api.github.com/repos/phpredis/phpredis/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpredis/phpredis/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpredis/phpredis/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpredis/phpredis/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpredis/phpredis/contents/{+path}","compare_url":"https://api.github.com/repos/phpredis/phpredis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpredis/phpredis/merges","archive_url":"https://api.github.com/repos/phpredis/phpredis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpredis/phpredis/downloads","issues_url":"https://api.github.com/repos/phpredis/phpredis/issues{/number}","pulls_url":"https://api.github.com/repos/phpredis/phpredis/pulls{/number}","milestones_url":"https://api.github.com/repos/phpredis/phpredis/milestones{/number}","notifications_url":"https://api.github.com/repos/phpredis/phpredis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpredis/phpredis/labels{/name}","releases_url":"https://api.github.com/repos/phpredis/phpredis/releases{/id}","deployments_url":"https://api.github.com/repos/phpredis/phpredis/deployments","created_at":"2011-03-15T14:40:14Z","updated_at":"2018-04-10T05:50:26Z","pushed_at":"2018-04-08T21:12:36Z","git_url":"git://github.com/phpredis/phpredis.git","ssh_url":"git@github.com:phpredis/phpredis.git","clone_url":"https://github.com/phpredis/phpredis.git","svn_url":"https://github.com/phpredis/phpredis","homepage":"","size":5278,"stargazers_count":6196,"watchers_count":6196,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1626,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1626,"open_issues":104,"watchers":6196,"default_branch":"develop"}},"base":{"label":"phpredis:develop","ref":"develop","sha":"a4ccbfdaa55c6cf4b13360ef9db411367b7e2d22","user":{"login":"phpredis","id":10171267,"avatar_url":"https://avatars2.githubusercontent.com/u/10171267?v=4","gravatar_id":"","url":"https://api.github.com/users/phpredis","html_url":"https://github.com/phpredis","followers_url":"https://api.github.com/users/phpredis/followers","following_url":"https://api.github.com/users/phpredis/following{/other_user}","gists_url":"https://api.github.com/users/phpredis/gists{/gist_id}","starred_url":"https://api.github.com/users/phpredis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpredis/subscriptions","organizations_url":"https://api.github.com/users/phpredis/orgs","repos_url":"https://api.github.com/users/phpredis/repos","events_url":"https://api.github.com/users/phpredis/events{/privacy}","received_events_url":"https://api.github.com/users/phpredis/received_events","type":"Organization","site_admin":false},"repo":{"id":1482997,"name":"phpredis","full_name":"phpredis/phpredis","owner":{"login":"phpredis","id":10171267,"avatar_url":"https://avatars2.githubusercontent.com/u/10171267?v=4","gravatar_id":"","url":"https://api.github.com/users/phpredis","html_url":"https://github.com/phpredis","followers_url":"https://api.github.com/users/phpredis/followers","following_url":"https://api.github.com/users/phpredis/following{/other_user}","gists_url":"https://api.github.com/users/phpredis/gists{/gist_id}","starred_url":"https://api.github.com/users/phpredis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpredis/subscriptions","organizations_url":"https://api.github.com/users/phpredis/orgs","repos_url":"https://api.github.com/users/phpredis/repos","events_url":"https://api.github.com/users/phpredis/events{/privacy}","received_events_url":"https://api.github.com/users/phpredis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpredis/phpredis","description":"A PHP extension for Redis","fork":false,"url":"https://api.github.com/repos/phpredis/phpredis","forks_url":"https://api.github.com/repos/phpredis/phpredis/forks","keys_url":"https://api.github.com/repos/phpredis/phpredis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpredis/phpredis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpredis/phpredis/teams","hooks_url":"https://api.github.com/repos/phpredis/phpredis/hooks","issue_events_url":"https://api.github.com/repos/phpredis/phpredis/issues/events{/number}","events_url":"https://api.github.com/repos/phpredis/phpredis/events","assignees_url":"https://api.github.com/repos/phpredis/phpredis/assignees{/user}","branches_url":"https://api.github.com/repos/phpredis/phpredis/branches{/branch}","tags_url":"https://api.github.com/repos/phpredis/phpredis/tags","blobs_url":"https://api.github.com/repos/phpredis/phpredis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpredis/phpredis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpredis/phpredis/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpredis/phpredis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpredis/phpredis/statuses/{sha}","languages_url":"https://api.github.com/repos/phpredis/phpredis/languages","stargazers_url":"https://api.github.com/repos/phpredis/phpredis/stargazers","contributors_url":"https://api.github.com/repos/phpredis/phpredis/contributors","subscribers_url":"https://api.github.com/repos/phpredis/phpredis/subscribers","subscription_url":"https://api.github.com/repos/phpredis/phpredis/subscription","commits_url":"https://api.github.com/repos/phpredis/phpredis/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpredis/phpredis/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpredis/phpredis/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpredis/phpredis/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpredis/phpredis/contents/{+path}","compare_url":"https://api.github.com/repos/phpredis/phpredis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpredis/phpredis/merges","archive_url":"https://api.github.com/repos/phpredis/phpredis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpredis/phpredis/downloads","issues_url":"https://api.github.com/repos/phpredis/phpredis/issues{/number}","pulls_url":"https://api.github.com/repos/phpredis/phpredis/pulls{/number}","milestones_url":"https://api.github.com/repos/phpredis/phpredis/milestones{/number}","notifications_url":"https://api.github.com/repos/phpredis/phpredis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpredis/phpredis/labels{/name}","releases_url":"https://api.github.com/repos/phpredis/phpredis/releases{/id}","deployments_url":"https://api.github.com/repos/phpredis/phpredis/deployments","created_at":"2011-03-15T14:40:14Z","updated_at":"2018-04-10T05:50:26Z","pushed_at":"2018-04-08T21:12:36Z","git_url":"git://github.com/phpredis/phpredis.git","ssh_url":"git@github.com:phpredis/phpredis.git","clone_url":"https://github.com/phpredis/phpredis.git","svn_url":"https://github.com/phpredis/phpredis","homepage":"","size":5278,"stargazers_count":6196,"watchers_count":6196,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1626,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1626,"open_issues":104,"watchers":6196,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/1335"},"html":{"href":"https://github.com/phpredis/phpredis/pull/1335"},"issue":{"href":"https://api.github.com/repos/phpredis/phpredis/issues/1335"},"comments":{"href":"https://api.github.com/repos/phpredis/phpredis/issues/1335/comments"},"review_comments":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/1335/comments"},"review_comment":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpredis/phpredis/pulls/1335/commits"},"statuses":{"href":"https://api.github.com/repos/phpredis/phpredis/statuses/02dcf48c64c827f5582e3c170056c4b8bd611a84"}},"author_association":"OWNER"}}
{"actor":{"display_login":"yatsukhnenko"}}