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

Checlist item state always true #21

Open
ilkka-rautiainen opened this issue Jan 29, 2016 · 8 comments
Open

Checlist item state always true #21

ilkka-rautiainen opened this issue Jan 29, 2016 · 8 comments
Labels
Milestone

Comments

@ilkka-rautiainen
Copy link

Because of this line:

$this->data['checkItems'][$key]['state'] = in_array($item['state'], array(true, 'complete', 'true'));

$this->data['checkItems'][$key]['state'] = in_array($item['state'], array(true, 'complete', 'true'));

Should be:

$this->data['checkItems'][$key]['state'] = in_array($item['state'], array(true, 'complete', 'true'), true);

The problem is that both 'incomplete' == true and 'complete' == true evaluate to true. The strict mode is required (in_array, third parameter). To me it seems even unneeded to have this kind of in_array check. The values are just 'incomplete' and 'complete', right? Can't we trust on that?

@cdaguerre
Copy link
Owner

@ilkka-rautiainen
I think so. Would you mind opening a PR?

@ilkka-rautiainen
Copy link
Author

Probably not as I stopped using the library as it was slow.

pe 29. tammikuuta 2016 19.03 Christian Daguerre notifications@github.com
kirjoitti:

@ilkka-rautiainen https://github.com/ilkka-rautiainen
I think so. Would you mind opening a PR?


Reply to this email directly or view it on GitHub
#21 (comment)
.

@cdaguerre
Copy link
Owner

Ok thanks for reporting anyway. This client uses guzzle for http requests and only adds a tiny bit of code so I'd be interested if you identified any specific bottlenecks...

@ilkka-rautiainen
Copy link
Author

Actually I found that it could have been the trello itself that was slow..

pe 29. tammikuuta 2016 19.13 Christian Daguerre notifications@github.com
kirjoitti:

Ok thanks for reporting anyway. This client uses guzzle for http requests
and only adds a tiny bit of code so I'd be interested if you identified any
specific bottlenecks...


Reply to this email directly or view it on GitHub
#21 (comment)
.

@ogabrielsantos
Copy link
Contributor

I think that it's very fast. Probably you have issues on your application reaching Trello's servers

@ilkka-rautiainen
Copy link
Author

Or actually the working principle is heavy, for example to update one
checklist item you have to first fetch the checklist itself.

pe 29. tammikuuta 2016 19.14 Ilkka Rautiainen iirautiainen@gmail.com
kirjoitti:

Actually I found that it could have been the trello itself that was slow..

pe 29. tammikuuta 2016 19.13 Christian Daguerre notifications@github.com
kirjoitti:

Ok thanks for reporting anyway. This client uses guzzle for http requests
and only adds a tiny bit of code so I'd be interested if you identified any
specific bottlenecks...


Reply to this email directly or view it on GitHub
#21 (comment)
.

@ogabrielsantos
Copy link
Contributor

Maybe you could open a new issue so we can discuss this.

@augustohp augustohp added the bug label Dec 21, 2016
@augustohp augustohp added this to the 1.0 milestone Dec 21, 2016
@benrowe
Copy link

benrowe commented Apr 2, 2018

I've submitted a PR to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants