adobe / adobe/stock-api-libphp

_initial_invalid_state not reset to true on searchFilesInitialize

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
20
Forks
23
PR merge metrics
No merged PRs in 30d

Description

# Issue report

## Brief description of issue

Code in `searchFilesInitialize` expects `_initial_invalid_state` to be true before making an API call. This flag is set to true in the constructor. After a first call to `searchFilesInitialize` everything works correctly, you can call afterwards `getNextResponse`, `getPreviousResponse`, etc.

However if you try to start a new search with the SearchFiles object calling again `searchFilesInitialize`, you will not be able to use `getNextResponse`, `getPreviousResponse`, etc. because `searchFilesInitialize` doesn't reset `_initial_invalid_state` to true.

## Proposed fix (if applicable)

Add `_initial_invalid_state = true;` add the end of `searchFilesInitialize`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.