Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed handling for commands with 3+ arguments. #20

Merged
merged 2 commits into from
Jan 2, 2013

Conversation

danhunsaker
Copy link
Contributor

Per Issue #19.

@danhunsaker
Copy link
Contributor Author

D'oh. I forgot that GitHub automatically creates a new Issue when you issue a pull request.

@joelcox
Copy link
Owner

joelcox commented Dec 31, 2012

Hey Dan, thanks for your pull request. This seems to break when you are using array arguments, but I'll take a good look later this week.

$this->redis->hmset('key', array('key1' => 'value1', 'key2' => 'value2'))

Happy New Year!

@danhunsaker
Copy link
Contributor Author

Hmmm... I see what's happening there... I'll whip up a fix here in just a moment.

@danhunsaker
Copy link
Contributor Author

I'm about to push the changes I promised a bit ago, but I wanted to confirm that an array argument will always be the last one passed in. If there are any cases where an array argument is not the last one passed, the logic gets a bit more complicated. Based on the setup of Redis::command(), however, I feel the solution I'm about to push is correct.

Please let me know if I am mistaken on this!

Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
@joelcox
Copy link
Owner

joelcox commented Jan 2, 2013

Looking at the list of Redis command this is indeed the case. I plan on adding new tests for every major command and the different notations this library supports before doing another release, just to make sure we don't break stuff unexpectedly.

@tinkertim I'm not sure how this will interfere with your downstream changes, but I'll merge this for now and we'll take care of it then if it needs work.

Thanks for your contribution Dan!

joelcox added a commit that referenced this pull request Jan 2, 2013
Fixed handling for commands with 3+ arguments.
@joelcox joelcox merged commit 8e255cf into joelcox:develop Jan 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants