-
Notifications
You must be signed in to change notification settings - Fork 123
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
Comments
@ilkka-rautiainen |
Probably not as I stopped using the library as it was slow. pe 29. tammikuuta 2016 19.03 Christian Daguerre notifications@github.com
|
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... |
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
|
I think that it's very fast. Probably you have issues on your application reaching Trello's servers |
Or actually the working principle is heavy, for example to update one pe 29. tammikuuta 2016 19.14 Ilkka Rautiainen iirautiainen@gmail.com
|
Maybe you could open a new issue so we can discuss this. |
I've submitted a PR to resolve this issue. |
Because of this line:
php-trello-api/lib/Trello/Model/Checklist.php
Line 245 in b1205d9
$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?
The text was updated successfully, but these errors were encountered: