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

php Notice in \Elastica\Index::getAliases() #1078

Closed
aeytom opened this issue Apr 16, 2016 · 5 comments
Closed

php Notice in \Elastica\Index::getAliases() #1078

aeytom opened this issue Apr 16, 2016 · 5 comments

Comments

@aeytom
Copy link

aeytom commented Apr 16, 2016

If es index has no alias a php notice occurs (missing array index)

Line 437: $data = $responseData[$this->getName()];

Es 2.3.1
Elastica 3.1.1

@natelenart
Copy link

+1

Came to report this issue, but saw it's already here.

@ewgRa
Copy link
Contributor

ewgRa commented Apr 21, 2016

I think it is not about "If es index has no alias", it is about - "if there is no index with this name in ES".

Question is what to do in this case. Throw something like MissingIndexException, or just return empty array. Like this index haven't aliases.

@ruflin
Copy link
Owner

ruflin commented Apr 21, 2016

@aeytom Does this happen if you use an Alias name to create the index object and then use getAliases()?

@gbprod
Copy link
Contributor

gbprod commented Apr 21, 2016

+1
Only happens if php error_reporting setting is set to -1
@ruflin I can create a pull request with a fix if you want

@ruflin
Copy link
Owner

ruflin commented Apr 21, 2016

Fixed in #1080

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

No branches or pull requests

5 participants