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
FIX suggestion of ip when subnet id is not the same as array index #34
Conversation
this looks good, in which context would the error happen? |
and also, is there an open bug about this? thanks! |
New Host: Network tab. I select a domain, then a subnet. I expect an ip address to be autosugested, but without my patch I only get a javascript error: Our select box looks like:
and drop_tet is defined as
subnet_id will be 3 in this case, but there is no 3th array index I hope you can make sense out of this :) |
No open bug that I know of, just something we ran into. Should I always file a bug report, or is just fixing it ok as well? |
hmm.. I can't reproduce, which browser is it? |
Firefox 11 |
OK, I want to try and reproduce to understand the root of the problem, thanks for the patch! |
If it makes it easier to understand:
I could also write:
The important thing is that if some subnets are removed, then you are missing some \n's to split on, so array indexing is off. |
what I'm not getting, is why would the returned array is wrong? |
Ok, another try:
Now you split it, and you get the array:
but since 'value' of the last option is 3, subnet_id will be 3, and
|
FIX suggestion of ip when subnet id is not the same as array index
Gracefully handle the 'garbage in' of an empty .foreman file.
Using older version of vagrant due to rsync issues
No description provided.