fixed search with 0#7
Conversation
|
Hi @jeysmook. I appreciate the PR. We are doing some internal reorganization of the SDKs and who manages them, so it may take a little time before it can be merged. |
|
The issue description: Steps to reproduce: Actual Result: Expected Result: Additional Info: When Current pull request is correcting the condition to explicitly check for empty string. Also, as the |
chfabbro
left a comment
There was a problem hiding this comment.
@sivaschenko and @jeysmook: I discussed this with the Stock team, and they made the following recommendations:
Since it's valid to make a search request with no keywords and we want to allow that for the SDK users then I think you should remove it.
Just make sure that where the value is used down the line to create the stock api request is valid and does not do something likesearch_parameters%5bwords%5d=null
Net, we recommend removing lines 516-517, if you can verify that only a string value will be passed to the API. BTW, null and undefined are valid search terms :) so perhaps the string type check in the method parameters is enough? Can you also please validate that text is properly escaped before sending to the API, so no one can pass control/escape codes to the server? Thanks!
public function setWords(string $words)
|
@chfabbro I added an update. Please see it. |
sivaschenko
left a comment
There was a problem hiding this comment.
Looks good! Thank you @jeysmook !
The file is reformatted according to best practices - unnecessary spaces removed from empty lines ✔️
|
I can't accept it in this state. Somebody's IDE changed the formatting of every line to add additional space. Stock standards don't allow formatting changes without a separate ticket. Please don't change the formatting when submitting PRs. |
|
@chfabbro Hi! I modified updates. Please see it. |
|
Looks good. Thank you for reverting the format changes! |
If I want to search by 0 I get errors "Should not be blank or null values in kewywords field". I fixed it.